0
0
PowerShellscripting~10 mins

Service management (Get/Start/Stop-Service) 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 status of the service named 'wuauserv'.

PowerShell
Get-Service -Name [1]
Drag options to blanks, or click blank then click option'
Aeventlog
Bbits
Cspooler
Dwuauserv
Attempts:
3 left
💡 Hint
Common Mistakes
Using the display name instead of the service name.
Forgetting the -Name parameter.
2fill in blank
medium

Complete the code to start the service named 'bits'.

PowerShell
Start-Service -Name [1]
Drag options to blanks, or click blank then click option'
Abits
Bwuauserv
Cspooler
Deventlog
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong service name.
Using Get-Service instead of Start-Service.
3fill in blank
hard

Fix the error in the code to stop the 'spooler' service.

PowerShell
Stop-Service [1]
Drag options to blanks, or click blank then click option'
A-Name spooler
Bspooler
C-Service spooler
D-ServiceName spooler
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the service name without the -Name parameter.
Using incorrect parameter names like -Service or -ServiceName.
4fill in blank
hard

Fill both blanks to get the status of the 'eventlog' service and display only its status property.

PowerShell
Get-Service [1] | Select-Object [2]
Drag options to blanks, or click blank then click option'
A-Name eventlog
BStatus
CName
D-Service eventlog
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong parameter names.
Selecting the wrong property.
5fill in blank
hard

Fill all three blanks to stop the 'wuauserv' service and then get its status.

PowerShell
Stop-Service [1]; Get-Service [2] | Select-Object [3]
Drag options to blanks, or click blank then click option'
A-Name wuauserv
CStatus
D-Service wuauserv
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent parameter names.
Forgetting to select the status property.