Download the AccExp freeware.
NOTE: An accounts expiration date should NOT be confused with the password expiration date.
When you type accexp /?, you receive:
AccExp user date \[/s machine\]
user User ID to view/modify
date Date in US format mm/dd/yy or mm/dd/yyyy
Value of NEVER clears the expiration
machine Machine to make the change at
View expiration date of account test on local machine
AccExp test /s testmachine
View expiration date of account test on server testmachine
AccExp test 1/30/02
Change expiration date of account t0 1/30/2002 for user test
AccExp test never
Set test to never expire
This software is Freeware. Use it as you wish at your own risk.
If you have improvement ideas, bugs, or just wish to say Hi, I
receive email 24x7 and read it in a semi-regular timeframe.
You can usually find me at email@example.com</b>
for /f "Tokens=1,3" %%e in ('accexp <UserName>') do if /i "%%e" EQU "Account" set Expire=%%f