Create an account that never expires and is a member of the Local administrators group from the command line

Written by James McDonald

October 9, 2023

In cmd or powershell run

net user toggenator /expires:never * /add
net localgroup Administrators toggenator /add

To confirm

net user toggenator

Output of net user command

User name                    toggenator 
Full Name                                                                                                                                         
User's comment                                                                                                                                    
Country/region code          000 (System Default)                                                                                                 
Account active               Yes                                                                                                                  
Account expires              Never                                                                                                                
Password last set            9/10/2023 5:25:44 PM                                                                                                 
Password expires             20/11/2023 5:25:44 PM                                                                                                
Password changeable          9/10/2023 5:25:44 PM                                                                                                 
Password required            Yes                                                                                                                  
User may change password     Yes                                                                                                                  
Workstations allowed         All                                                                                                                  
Logon script                                                                                                                                      
User profile                                                                                                                                      
Home directory                                                                                                                                    
Last logon                   Never                                                                                                                
Logon hours allowed          All                                                                                                                  
Local Group Memberships      *Administrators       *Users                                                                                         
Global Group memberships     *None                                                                                                                
The command completed successfully.


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…