Listing the Updates of the Servers under a Certain "OU"
$OU= "OU=MUHASEBE,DC=guler,DC=com" foreach ($Serverlist in (Get-ADComputer -Filter * -SearchBase $OU | select name).Name) { "Servername: "+ $Serverlist Get-Hotfix -cn $Serverlist | Select HotfixID, Description, InstalledOn, ServicePackLevel " " }
This PowerShell script gets the list of computers in the Organization Unit named "ACCOUNTING" in the "guler.com" domain. Then it shows the server name and installed hotfixes for each server.
This post is licensed under CC BY 4.0 by the author.