0
0
PowerShellscripting~5 mins

Process management (Get/Stop-Process) in PowerShell - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the <code>Get-Process</code> cmdlet do in PowerShell?

Get-Process shows a list of all running processes on your computer. It helps you see what programs or services are active.

Click to reveal answer
beginner
How do you stop a process by its name using PowerShell?

You use Stop-Process -Name <processName>. For example, Stop-Process -Name notepad stops all Notepad processes.

Click to reveal answer
beginner
What parameter would you use with Get-Process to find a specific process by its ID?

Use -Id parameter. For example, Get-Process -Id 1234 shows the process with ID 1234.

Click to reveal answer
intermediate
What happens if you try to stop a process that requires administrator rights without running PowerShell as admin?

The command will fail with an error because you don’t have permission to stop that process. You need to run PowerShell as administrator.

Click to reveal answer
beginner
How can you stop a process using its process ID in PowerShell?

Use Stop-Process -Id <processId>. For example, Stop-Process -Id 5678 stops the process with ID 5678.

Click to reveal answer
Which cmdlet lists all running processes on your computer?
AStop-Process
BGet-Process
CStart-Process
DNew-Process
How do you stop a process named 'chrome' using PowerShell?
AStop-Process -Id chrome
BGet-Process -Name chrome
CStop-Process -Name chrome
DKill-Process chrome
What parameter lets you specify a process ID with Get-Process?
A-Id
B-PIDName
C-ProcessId
D-Name
If you don’t run PowerShell as administrator, what happens when you try to stop a system process?
AYou get a permission error
BPowerShell crashes
CProcess stops successfully
DProcess restarts automatically
Which command stops a process with ID 4321?
AKill-Process -Id 4321
BStop-Process -Name 4321
CGet-Process -Id 4321
DStop-Process -Id 4321
Explain how to list all running processes and then stop one by its name using PowerShell.
Think about how you first see processes and then stop one by name.
You got /3 concepts.
    Describe what permissions are needed to stop certain processes and how to handle permission errors in PowerShell.
    Consider what happens when you try to stop system processes.
    You got /3 concepts.