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




2022-05-07

1. Jobs to check

2. Useful Index

이미 적용했는지 잘 모를때, 그냥 해보면 이미 있는 경우면 기존에 있다고 알려주고 끝나니 걱정 말고 시도해보면 됨

dm_DMClean, dm_DMFilescan
  EXECUTE make_index WITH type_name = 'dmr_content', attribute='data_ticket', attribute='format', attribute='storage_id'