Thursday, January 23, 2014

Sweepers, Sweepers, Man Your Brooms



Users will always have some type of home directory where they can store their data.  Often times, these directories are not deleted after a user leaves the company.

Try this short script to see if what directories are not tied to existing accounts in your Active Directory:

 foreach ($user in get-content c:\temp\users.txt)
 {if( Get-QADUser -LogonName $user ) {$user + ",exists"} else {$user +",does not exist in AD"}
         }



"Sweepers, Sweepers, man your brooms. Give the ship a good clean sweep down both fore and aft! Sweep down all lower decks, ladder backs and passageways! Dump all garbage clear of the fantail!"