0
0
PowerShellscripting~10 mins

Windows features management 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 Windows features on your system.

PowerShell
Get-WindowsFeature | [1]
Drag options to blanks, or click blank then click option'
AWhere-Object {$_.Installed -eq $true}
BSelect-Object Name, DisplayName, Installed
CStart-Service
DRemove-WindowsFeature
Attempts:
3 left
💡 Hint
Common Mistakes
Using Where-Object filters features but does not list all.
Start-Service and Remove-WindowsFeature are for other tasks.
2fill in blank
medium

Complete the code to install the Windows feature named 'Telnet-Client'.

PowerShell
Install-WindowsFeature -Name [1]
Drag options to blanks, or click blank then click option'
ATelnet-Client
BDNS
CFile-Services
DWeb-Server
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong feature name causes the command to fail.
Confusing 'Web-Server' or 'DNS' with Telnet.
3fill in blank
hard

Fix the error in the code to uninstall the feature 'Telnet-Client'.

PowerShell
Uninstall-WindowsFeature -Name [1]
Drag options to blanks, or click blank then click option'
ATelnet-Client
BTelnetClient
CTelnet_Client
DTelnet Client
Attempts:
3 left
💡 Hint
Common Mistakes
Removing dashes or spaces in the feature name causes errors.
Using incorrect feature names leads to command failure.
4fill in blank
hard

Fill both blanks to check if the feature 'Telnet-Client' is installed and store the result in $isInstalled.

PowerShell
$feature = Get-WindowsFeature -Name [1]
$isInstalled = $feature.[2]
Drag options to blanks, or click blank then click option'
ATelnet-Client
BInstalled
CInstallState
DName
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'InstallState' instead of 'Installed' returns a string, not a boolean.
Misspelling the feature name causes $feature to be null.
5fill in blank
hard

Fill all three blanks to install the feature 'Telnet-Client' and restart the computer automatically if needed.

PowerShell
Install-WindowsFeature -Name [1] -IncludeManagementTools [2] [3]
Drag options to blanks, or click blank then click option'
A-Restart
BTelnet-Client
C-Verbose
D-Force
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting -Restart means no automatic reboot.
Using wrong feature names causes failure.
Not including -Verbose hides detailed progress.