0
0
PowerShellscripting~10 mins

Process management (Get/Stop-Process) in PowerShell - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the list of all running processes.

PowerShell
Get-[1]
Drag options to blanks, or click blank then click option'
ACommand
BProcess
CService
DItem
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
2fill in blank
medium

Complete the code to stop a process named 'notepad'.

PowerShell
Stop-Process -Name [1]
Drag options to blanks, or click blank then click option'
Anotepad
Bchrome
Cexplorer
Dpowershell
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong process name that is not running
Confusing process names with application window titles
3fill in blank
hard

Fix 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'
AId
BName
CPID
DProcessId
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-Name' instead of '-Id' to specify process ID
Using '-PID' which is not a valid parameter
4fill in blank
hard

Fill 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'
ACPU
B>
C<
DName
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' for filtering
Using 'Name' property instead of 'CPU'
5fill in blank
hard

Fill 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'
Achrome
BName
CTrue
DId
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