Advertisement
adamchilcott

enableRSAT.ps1

Apr 29th, 2019
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ####################################################################
  2. # Install RSAT Feature on Demand on Windows 10 1809 Using PowerShell
  3. ####################################################################
  4.  
  5. $currentWU = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" | select -ExpandProperty UseWUServer
  6. Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
  7. Restart-Service wuauserv
  8. Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online
  9. Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value $currentWU
  10. Restart-Service wuauserv
  11.  
  12. #############
  13. # START NOTES
  14. #############
  15.  
  16. ## Reference:
  17. ## <http://woshub.com/install-rsat-feature-windows-10-powershell/>
  18.  
  19. ###########
  20. # END NOTES
  21. ###########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement