Description
Attempting to be more proficient at learning PowerShell by using PowerShell for Automation.
Problem Trying to solve: "Run weekly updates to my cluster of windows devices (50 servers & 50 desktops) that is in vSphere 6.7, "
Question I want answered: "Review my following PowerShell I have tested to run the windows update on my Win10 local device, but I need assistance scripting out the rest of the PowerShell code for automation. " I have already written down all the cluster from vSphere 50 servers & 50 desktops in text file and called it computers.txt.
#Import-Module PSWindowsUpdate
#Remove-Item -Path C:\Scripts\status.tx
#Start-Transcript -Path C:\Scripts\status.txt
#$Updates = "Critical Updates", "Security Updates"
#Get-WUInstall -AcceptALL- Verbose -IgnoreReboot -Category $Updates
#Write-Host "Done"
#Stop-Transcript
#Start-Sleep -s 120
#Restart-Computer -Force -Confirm:$false
-- after pc restarts run as PS As Administrator
Get-WindowsUpdate
Thanks