AD user status script

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
admssm
Posts: 1
Joined: 18 Jun 2013 07:23

AD user status script

#1 Post by admssm » 18 Jun 2013 07:28

Hi,

i need to create a script which would check users account status (active/deactivates) and if the account is deactivated (in a dedicated OU), it would trigger an action to delete his home folder on a share.
I can do the trigger /action part, i just cant figure out how to search ad and check user account status..

Can you please help me with this..?

Thx

Ivan

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: AD user status script

#2 Post by Squashman » 18 Jun 2013 07:51

Code: Select all

net user squashman /domain | find "Account active"

Post Reply