Created
November 13, 2015 11:01
-
-
Save chipitsine/64ab7d42ca909ff3f42e to your computer and use it in GitHub Desktop.
older.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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