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 V01.01.00cpp Joe Richards (email@example.com) August 2002 Usage: 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 Ex1: AccExp test View expiration date of account test on local machine Ex2: AccExp test /s testmachine View expiration date of account test on server testmachine Ex3: AccExp test 1/30/02 Change expiration date of account t0 1/30/2002 for user test Ex4: 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 firstname.lastname@example.orgIf you wanted the value to be available in a batch script:
set Expire=Never for /f "Tokens=1,3" %%e in ('accexp <UserName>') do if /i "%%e" EQU "Account" set Expire=%%f