I have this code to look for the last update installed, per DC but it shows all updates
$DCs = [DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() |
Select-Object -ExpandProperty DomainControllers |
Select-Object -ExpandProperty Name
Foreach ($DC in $DCS){
Invoke-Command -ComputerName $DC {
(Get-HotFix | Sort-Object -Property InstalledOn[-1] )
}
}
How would I restrict to just the last 3 updates?