2022-06-20

Windows Update by Command Line (Powershell)

 Windows Update by Command Line (Powershell)


Simple Sequence

Run as Administrator

PS C:\Users\Administrator> Install-Module PSWindowsUpdate

PS C:\Users\Administrator> Get-WindowsUpdate

PS C:\Users\Administrator> Install-WindowsUpdate



Advanced Commands

PS C:\Users\Administrator> Get-PSRepository





PS C:\Users\Administrator> Remove-PSRepository PSGallery

PS C:\Users\Administrator> Add-PSRepository -Name PSGallery -InstallationPolicy Trusted

PS C:\Users\Administrator> Get-WUServiceManager

"Microsoft Update" is the latest. "Windows Update" is an older one, like for Windows 7.

PIC 2

 




PS C:\Users\Administrator> Add-WUServiceManager -MicrosoftUpdate

PS C:\Users\Administrator> Get-WUInstall -MicrosoftUpdate


Good to know:

Import-Module PSWindowsUpdate

Install-Module -Name PSWindowsUpdate -Force

Get-Command -Module PSWindowsUpdate

Install-Module -Name PSWindowsUpdate -Force




댓글 없음:

댓글 쓰기