-
Notifications
You must be signed in to change notification settings - Fork 5
local_user_create.ps1
Corey Watson edited this page Dec 19, 2025
·
1 revision
Creates a new local user account with specified username and password.
This script creates a new local user account with specified username and password. Optionally adds the user to the Administrators group.
Creates a new local user account with specified username and password. Optionally adds the user to the Administrators group.
- Windows 10/11
- Admin privileges required
- PowerShell 5.1+
- Hardcoded values (username, password, admin flag)
- Username : Username for the new account
- Password : Password for the account
- AddToAdmin : "Yes" or "No" - whether to add to Administrators group
- Creates standard local user account
- Optional administrator privileges
- Validates inputs
- Creates local user account
- Optionally adds to Administrators group
- Reports final status
- Password visible in script - use RMM variables for production
- No secrets logged to output
- 0: Success
- 1: Failure
[ INPUT VALIDATION ]
--------------------------------------------------------------
Username : newuser
Add to Admin: No
[ OPERATION ]
--------------------------------------------------------------
Creating user account...
User created successfully
[ RESULT ]
--------------------------------------------------------------
Status : Success
User : newuser
Admin : No
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- 2025-11-29 v1.0.0 Initial Style A implementation
- View Script Source
- Scripts - Back to script index