Bird
0
0

Which of the following is the correct syntax to install the Windows feature named 'Web-Server' using PowerShell?

easy📝 Syntax Q12 of 15
PowerShell - System Administration
Which of the following is the correct syntax to install the Windows feature named 'Web-Server' using PowerShell?
AEnable-WindowsFeature -Feature Web-Server
BGet-WindowsFeature -Install Web-Server
CAdd-WindowsFeature Web-Server
DInstall-WindowsFeature -Name Web-Server
Step-by-Step Solution
Solution:
  1. Step 1: Identify the cmdlet for installing features

    The correct cmdlet to install a feature is Install-WindowsFeature.
  2. Step 2: Check the parameter usage

    The feature name is passed with the -Name parameter, so Install-WindowsFeature -Name Web-Server is correct.
  3. Final Answer:

    Install-WindowsFeature -Name Web-Server -> Option D
  4. Quick Check:

    Install-WindowsFeature -Name = install feature [OK]
Quick Trick: Use Install-WindowsFeature with -Name to install features [OK]
Common Mistakes:
  • Using Get-WindowsFeature to install
  • Using Add-WindowsFeature which is not a valid cmdlet
  • Using Enable-WindowsFeature which does not exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes