Skip to content

Instantly share code, notes, and snippets.

@chipitsine
Created November 13, 2015 11:01
Show Gist options
  • Save chipitsine/64ab7d42ca909ff3f42e to your computer and use it in GitHub Desktop.
Save chipitsine/64ab7d42ca909ff3f42e to your computer and use it in GitHub Desktop.
older.ps1
cls
Import-Module ActiveDirectory
$d = (Get-date).AddDays(-30)
Get-ADComputer -Filter { (Enabled -eq $true) -and (OperatingSystem -like "*XP*") -and (PasswordLastSet -ge $d) } -Properties Name, OperatingSystem | ForEach-Object {
Write-Host $_.Name, $_.OperatingSystem
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment