0
0
PowerShellscripting~10 mins

Command discovery (Get-Command) 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 list all commands available in PowerShell.

PowerShell
Get-[1]
Drag options to blanks, or click blank then click option'
AItem
BProcess
CCommand
DService
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Get-Item' lists files and folders, not commands.
Using 'Get-Process' lists running processes, not commands.
Using 'Get-Service' lists services, not commands.
2fill in blank
medium

Complete the code to find commands that start with 'Get-'.

PowerShell
Get-Command -Name '[1]*'
Drag options to blanks, or click blank then click option'
AGet-
BRemove-
CNew-
DSet-
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Set-*' will find commands starting with 'Set-', not 'Get-'.
Using 'New-*' or 'Remove-*' filters wrong command prefixes.
3fill in blank
hard

Fix the code to find commands with the verb 'Get'.

PowerShell
Get-Command -Verb [1]
Drag options to blanks, or click blank then click option'
A'Get'
B'get'
Cget
DGet
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes works in simple cases but quotes are best practice.
Using lowercase 'get' works due to case-insensitivity, but use conventional 'Get'.
4fill in blank
hard

Fill both blanks to list commands with noun 'Service' and verb 'Get'.

PowerShell
Get-Command -Noun [1] -Verb [2]
Drag options to blanks, or click blank then click option'
A'Service'
B'Process'
C'Get'
D'Set'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Process' instead of 'Service' for noun.
Using 'Set' instead of 'Get' for verb.
5fill in blank
hard

Fill all three blanks to find commands with noun 'Item', verb 'Remove', and module 'Microsoft.PowerShell.Management'.

PowerShell
Get-Command -Noun [1] -Verb [2] -Module [3]
Drag options to blanks, or click blank then click option'
A'Item'
B'Remove'
C'Microsoft.PowerShell.Management'
D'Get'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Get' instead of 'Remove' for verb.
Using wrong module name or missing quotes.