Skip to content

Instantly share code, notes, and snippets.

@iqwirty
Created April 7, 2014 14:13
Show Gist options
  • Save iqwirty/10021078 to your computer and use it in GitHub Desktop.
Save iqwirty/10021078 to your computer and use it in GitHub Desktop.
Show a list of user accounts disabled in the last 10 days
# Depends on the Quest snap-in for Active Directory management
Add-PSSnapin Quest.ActiveRoles.ADManagement
Get-QADUser -Disabled -ShowProgress -PageSize 1000 -SizeLimit 0 | `
Where { $_.WhenChanged -gt (Get-Date).AddDays(-10) } | `
Select DisplayName, Name, Department, Title, WhenChanged | `
Sort DisplayName | `
Format-Table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment