Wednesday, January 22, 2020

PowerShell - Windows Server Roles and Features

Windows Server Roles and Features (PowerShell)
  1. Login to LON-DC1 as Adatum\Administrator with password Pa$$w0rd.
  2. Open a Windows PowerShell prompt and ensure you are running in an administrator context; this can be done by right-clicking the icon in the taskbar and selecting Run as Administrator.
  3. To view commands that pertain to Windows features type: Get-Command *WindowsFeature
  4. Review the help that is available on the Get-WindowsFeature command: Help Get-WindowsFeature -showwindow
  5. To review the roles and features installed on the local machine type: Get-WindowsFeature
  6. Note the Name which is used for command line actions. Note the InstallState values: Available, Installed, Removed.
  7. To view just the installed features on LON-SVR1 type: Get-WindowsFeature -ComputerName LON-SVR1 | Where InstallState -eq Installed
  8. To review the roles and features installed on LON-SVR1 from LON-DC1 type: Get-WindowsFeature -ComputerName LON-SVR1
  9. To deploy the XPS Viewer on the local machine type: Install-WindowsFeature XPS-Viewer
  10. To deploy WINS on LON-SVR1 type: Install-WindowsFeature WINS -ComputerName LON-SVR1
  11. To uninstall the XPS Viewer on the local machine type: Uninstall-WindowsFeature XPS-Viewer
  12. Features on Demand lets you add and remove role and feature files, also known as feature payload, from Window Server. This allows you to reduce and conserve space.
  13. To remove WINS and its payload from LON-SVR1 type: Uninstall-WindowsFeature WINS -ComputerName LON-SVR1 -Remove
To install a role or feature where the payload was removed, but the installation media is available.
Install-WindowsFeature –Restart –Source wim:d:\sources\install.wim:4

The launchpad to a career in IT. This program is designed to take beginner learners to job readiness in about eight months.

No comments:

Post a Comment