Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to get the list of all running processes.
PowerShell
Get-[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using Get-Service instead of Get-Process
Using Get-Item which is for files and folders
Using Get-Command which lists commands, not processes
✗ Incorrect
The Get-Process cmdlet retrieves all running processes on the system.
2fill in blank
mediumComplete the code to stop a process named 'notepad'.
PowerShell
Stop-Process -Name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong process name that is not running
Confusing process names with application window titles
✗ Incorrect
The Stop-Process cmdlet stops the process with the specified name, here 'notepad'.
3fill in blank
hardFix the error in the code to get the process with ID 1234.
PowerShell
Get-Process -[1] 1234
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-Name' instead of '-Id' to specify process ID
Using '-PID' which is not a valid parameter
✗ Incorrect
The correct parameter to specify a process ID is '-Id'.
4fill in blank
hardFill both blanks to get all processes with CPU usage greater than 100.
PowerShell
Get-Process | Where-Object { $_.[1] [2] 100 } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' for filtering
Using 'Name' property instead of 'CPU'
✗ Incorrect
The CPU property shows CPU usage, and '>' filters for values greater than 100.
5fill in blank
hardFill all three blanks to stop all processes with names starting with 'chrome'.
PowerShell
Get-Process -Name [1]* | Stop-Process -[2] -Force:[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-Id' instead of '-Name' to stop by name
Not using the wildcard '*' to match all starting with 'chrome'
Omitting the '-Force' parameter or setting it to False
✗ Incorrect
Use 'chrome*' to match all processes starting with 'chrome', '-Name' to specify by name, and '-Force:True' to force stop.