Windows Updates via Powershell auslesen von Remote aus
Hallo Zusammen,
ich bin aktuell echt am Verzweifeln. Aktuell hab ich mir einen Befehl zusammengebastelt, der aber nicht so ganz klappt...
Ich hoffe Ihr könnt mich bei meinem Vorhaben unterstützen.
Ziel sollte das ganze sein, dass man sich via Powershell an einem Server anmeldet und dort die "offenen" Updates auslesen kann.
Befehl: Enter-PSSession -ComputerName <SERVERNAME> -Credential DOMAIN\USER Invoke-Command -ScriptBlock { Get-WindowsUpdate -MicrosoftUpdate -Verbose }
Grüße
Klaus
ich bin aktuell echt am Verzweifeln. Aktuell hab ich mir einen Befehl zusammengebastelt, der aber nicht so ganz klappt...
Ich hoffe Ihr könnt mich bei meinem Vorhaben unterstützen.
Ziel sollte das ganze sein, dass man sich via Powershell an einem Server anmeldet und dort die "offenen" Updates auslesen kann.
Befehl: Enter-PSSession -ComputerName <SERVERNAME> -Credential DOMAIN\USER Invoke-Command -ScriptBlock { Get-WindowsUpdate -MicrosoftUpdate -Verbose }
Grüße
Klaus
Please also mark the comments that contributed to the solution of the article
Content-Key: 615622
Url: https://administrator.de/contentid/615622
Printed on: April 26, 2024 at 05:04 o'clock
5 Comments
Latest comment
Get-HotFix -ComputerName "<Name-des-Computers>"
Uuups, aber auch kein Beinbruch
Invoke-Command -ComputerName XYZ -ScriptBlock {
((new-object -ComObject "Microsoft.Update.Session").CreateUpdateSearcher()).Search("Type='Software' and IsInstalled=0 and IsHidden=0").Updates | select Title, IsInstalled
}
-Computername akzeptiert auch ein String-Array mit den Computernamen/Adressen als Parameter . Die werden dann auch parallel abgefackelt.
Windows PowerShell: Dive Deep into Remoting
Windows PowerShell: Dive Deep into Remoting