Complete the code to group processes by their name.
Get-Process | Group-Object -Property [1]Id groups by process ID, which is unique for each process.The Name property groups processes by their process name.
Complete the code to count how many processes are in each group.
Get-Process | Group-Object -Property Name | Select-Object Name, [1]Length or Size which do not exist on group objects.The Count property shows how many items are in each group.
Fix the error in the code to group services by status.
Get-Service | Group-Object -Property [1]ServiceName groups by unique names, not status.The Status property groups services by their running state (e.g., Running, Stopped).
Fill both blanks to group processes by CPU usage and select the group name and count.
Get-Process | Group-Object -Property [1] | Select-Object [2], Count
Group processes by CPU usage and select the Name of each group and its count.
Fill all three blanks to group services by status, select the group name, count, and the first service's display name.
Get-Service | Group-Object -Property [1] | Select-Object [2], Count, @{Name='FirstService';Expression={$_.Group[[3]].DisplayName}}
Group services by Status, select the group Name, count, and the first service's display name using index 0.