File: windows_update.ps1

package info (click to toggle)
gitlab-ci-multi-runner 14.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,248 kB
  • sloc: sh: 1,694; makefile: 384; asm: 79; ruby: 68
file content (10 lines) | stat: -rw-r--r-- 403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# Please make sure https://www.powershellgallery.com/packages/PSWindowsUpdate/2.1.0.1 is installed.
if (Get-Command -Module PSWindowsUpdate -errorAction SilentlyContinue)
{
    Write-Output "Running windows update"
    Install-WindowsUpdate -AcceptAll -IgnoreReboot
} 
else
{
    Write-Error "PSWindowsUpdate is not installed, please check https://www.powershellgallery.com/packages/PSWindowsUpdate/"
}