JSI Tip 7263. Accexp freeware quickly sets or retrieves a non-domain account's expiration value.

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 protected]) August 2002

 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

    AccExp test
      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 protected]
If 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

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.