Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Define Title
- $host.UI.RawUI.WindowTitle = "Update Windows"
- #Define Function to set color
- function color ($bc,$fc) {
- $a = (Get-Host).UI.RawUI
- $a.BackgroundColor = $bc
- $a.ForegroundColor = $fc ; cls}
- #Set color
- color "DarkGray" "White"
- #Set size of console shell
- cmd /c MODE con:cols=135 lines=30
- # Ensure that services are started
- Start-Service -Name BITS
- Start-Service -Name wuauserv
- Start-Service -Name cryptSvc
- Start-Service -Name msiserver
- #Run the script to install Windows Updates.
- Write-Host('Searching, Downloading, and Installing Updates...')
- Install-WindowsUpdate -AcceptAll -MicrosoftUpdate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement