Create a Windows Local Admin Account Instantly

Last Updated on October 28, 2026

If you have ever installed Microsoft Windows on your computer, you know that Microsoft requires you to sign in using a Microsoft Account. This setup provides a seamless experience across all your connected devices and online services. Using a Microsoft account allows you to synchronize settings, files, and apps effortlessly. You gain instant access to cloud services like OneDrive and benefit from security features such as multi-factor authentication.

Many people still prefer to use a traditional local account with Windows. You can use this as a secondary account or set it up as your main profile. A local account allows for much more privacy. It completely removes your reliance on an account controlled by Microsoft to log into your own machine. Manually adding a local administrator account in Windows takes unnecessary time. We will show you how to instantly create a local account in Windows using a simple script.

How to Create a Local Admin Account in Windows with PowerShell (Fast Method)

Using the First PowerShell Script

1. Open PowerShell as Administrator

The process of instantly creating a local administrator account involves using PowerShell to run a specific script. You absolutely must run PowerShell as an administrator for this process to work properly. Click your Start menu and type the word PowerShell into the search box. Right-click the application icon and select Run as administrator to open the elevated terminal window.

2. Customize Your Credentials

You only need to edit a couple of sections of this script to customize it with your own credentials. Add your desired username in the $Name = “” section exactly between the quotation marks. You will then add a secure password to the $Password = “” section right between those quotes. Look at the code block below to see exactly how the script is structured.

# new local Admin user
$Name = “Bob”
$Password = “EG*&wlt1”
$SecureString = ConvertTo-SecureString -AsPlainText $Password -Force
$Description = “Administrator, Owner, Boss”
$Group = “Administrators”
$NewUserSplat = @{
Name = $Name
Password = $SecureString
Description = $Description
AccountNeverExpires = $true
PasswordNeverExpires = $true
}
New-LocalUser @NewUserSplat
Add-LocalGroupMember -Member $Name -Group $Group

3. Execute the Script

Copy the entire modified script block and paste it directly into your elevated PowerShell window. Press the Enter key on your keyboard to execute the commands instantly. The system will process the script and generate your brand new local administrator profile in the background.

Using the Alternative PowerShell Script

1. Understand the Second Script

There are two different scripts you can try just in case the first one fails on your specific system build. This alternative script uses the legacy Net.exe command wrapped inside PowerShell variables. It achieves the exact same result by bypassing the newer local user commandlets. You must still run this inside an elevated PowerShell window.

2. Edit the Username and Password

You will want to add your custom username to the $UserName = “” line between the quotes. Do the exact same thing for your password on the $Password = “” line just below it. Review the code block below to copy the exact formatting required for this alternative method.

$UserName = “Bob”
$Password = “Password”
$Description = “Administrator, Owner, Boss”
$Net = “Net.exe”
$User = “User”
$Add = “/Add”
$NeverExpires = “/Expires:Never”
$Comment = “/Comment:`”$Description`””
$Switches1 = @( $User, $UserName, $Password, $Add, $NeverExpires, $Comment )
& $Net @Switches1

$Localgroup = “Localgroup”
$Group = “Administrators”
$Switches2 = @( $Localgroup, $Group, $UserName, $Add )
& $Net @Switches2

3. Run the Alternative Command

Here is how the second script looks when run in PowerShell to add a local administrator account named Bob. Paste the entire block of code into your terminal window and hit Enter. You will see a success message indicating the command completed successfully.

Create admin user with PowerShell
PowerShell command

Verifying Your New Admin Account

1. Check the Start Menu

You need to verify the new account exists after running either of these scripts. Click on your Start button and click on your current user profile picture. You should see the new local administrator account shown right alongside your other configured accounts.

2. Log Into the New Profile

Click directly on the new user name to switch profiles immediately. Windows will log you into this new local account using the exact password you specified in the script. You now have full administrative control over the machine without any Microsoft account attachments.

How to Instantly Create a Local Administrator Account in Windows
New user account configured

For additional training resources, check out our online IT training courses.

Check out our extensive IT book series.

Related Posts

© 2026 Online Computer Tips
Website by Anvil Zephyr