Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using PowerShell for Automation: Running Windows Updates in a vSphere Cluster #83

Open
uxlab9 opened this issue Jan 21, 2022 · 2 comments

Comments

@uxlab9
Copy link

uxlab9 commented Jan 21, 2022

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

@uxlab9
Copy link
Author

uxlab9 commented Jan 25, 2022

Exported list of all installed Hotfixes on all Domain Computers. Disadvantage is you do not know whether the computers are on or off.

#Invoke-Command -ComputerName (Get-ADComputer -Filter *).Name {Get-HotFix} -ErrorAction SilentlyContinue | Select-Object PSComputername, HotfixID, InstalledOn | Out-GridView

If you want to know which computers are not reachable remove the parameter #ErrorAction SilentlyContinue

@sdwheeler
Copy link
Contributor

@uxlab9 Is this a blog post you want to write?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants