Modify a Local User Account So It Never Expires

Binds to the local user account on a computer named atl-win2k-01, and configures the account so that it never expires.

 
 
 
 
 
4 Star
(1)
Add to favorites
8/10/2009
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • quicker and set to run on local machine
    2 Posts | Last post November 27, 2011
    • If you change the strcomputer variable to "localhost" it will run faster and not require you to look up the computer's name.  This does work on Windows 7 32bit.  
    • Localhost works for me on Windows 7, Windows Server 2008 R2, and Windows Server 2003. It fails on Windows 2000, Windows Server 2000, and Windows XP. I don't have a Vista computer to test, but I assume it will work there. However, you can also use "." for strComputer. This seems to be equally fast, and works on every OS since Windows 95. Of course, if you want the script to operate on a local account on another computer, you must specify the NetBIOS name of the remote computer. The script will work if your account is a member of the local Administrators group on the remote computer. Since by default the group "Domain Admins" is made a member of the local Administrators group when the computer is joined to the domain, being a member of this group usually allows you to run scripts like this remotely (if the remote computer is online).