Complete the code to filter processes with CPU usage greater than 100.
Get-Process | Where-Object { $_.CPU [1] 100 }The operator -gt means 'greater than' in PowerShell, so it filters processes with CPU usage greater than 100.
Complete the code to filter services that are running.
Get-Service | Where-Object { $_.Status [1] 'Running' }The operator -eq means 'equals' in PowerShell, so it filters services whose status is exactly 'Running'.
Fix the error in the code to filter files larger than 1MB.
Get-ChildItem | Where-Object { $_.Length [1] 1MB }The operator -gt means 'greater than' in PowerShell, so it filters files larger than 1MB.
Fill both blanks to filter processes with names starting with 'S' and CPU usage less than 50.
Get-Process | Where-Object { $_.ProcessName [1] 'S*' -and $_.CPU [2] 50 }-like is used for pattern matching with wildcards, so it filters process names starting with 'S'. -lt means 'less than', so it filters CPU usage less than 50.
Fill all three blanks to create a dictionary of process names and their CPU usage, filtering only those with CPU usage greater than 10.
$result = @{ [1] = [2].ProcessName; [3] = [2].CPU } | Where-Object { [2].CPU -gt 10 }This code creates a dictionary with keys 'Name' and 'CPU' from each process object stored in '$process'. It filters processes with CPU usage greater than 10 using '-gt'.