Tuesday, October 9, 2012

Change Account Expiry for Bulk Users ?


----------------------------------------------------------------------------------------------------------
Create a file SAMID.txt and put all the account name in it and execute the command from the current directory

for /f %C in (SAMID.txt) do dsquery user -samid %C | dsmod user -acctexpires

Ex. Today 29-May-2012 and extension has to be done upto 30-JUNE-2012,
Then the no. of days will be 30+3=33

------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment