Saturday, April 23, 2011

Blog Post: PowerShell Script get Active Directory objects that are Expired and delete them

 

import-module activedirectory  $ADO = Search-ADAccount -AccountExpired  foreach($object in $ADO)  {  Remove-ADObject -Identity $object.DistinguishedName -Confirm:$false  }

Brody Dalle Taryn Manning Nikki Cox Carla Gugino Ana Hickmann

No comments:

Post a Comment