Skip to content

Instantly share code, notes, and snippets.

@breakersall
Last active August 29, 2015 14:02
Show Gist options
  • Save breakersall/2241889333fb83397eb1 to your computer and use it in GitHub Desktop.
Save breakersall/2241889333fb83397eb1 to your computer and use it in GitHub Desktop.
#Uses carlos' https://github.com/darkoperator
$hosts = Get-AuditDSComputerAccount -DomainController <IP> -Credential (Get-Credential)
$hosts | Where-Object {(($_.OperatingSystem -match "XP" -and $_.ServicePack -eq "Service Pack 1") -or ($_.OperatingSystem -match "XP" -and $_.ServicePack -eq "Service Pack 2") -or ($_.OperatingSystem -match "XP" -and $_.ServicePack -eq "")) -or ($_.OperatingSystem -match "2000") -or (($_.OperatingSystem -match "2003" -and $_.ServicePack -eq "") -or ($_.OperatingSystem -match "2003" -and $_.ServicePack -eq "Service Pack 1"))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment