local_user_create.ps1 - limehawk/rmm-scripts GitHub Wiki
local_user_create.ps1
Creates a new local user account with specified username and password.
Overview
This script creates a new local user account with specified username and password. Optionally adds the user to the Administrators group.
Purpose
Creates a new local user account with specified username and password. Optionally adds the user to the Administrators group.
Prerequisites
- Windows 10/11
- Admin privileges required
- PowerShell 5.1+
Configuration
Data Sources & Priority
- Hardcoded values (username, password, admin flag)
Required Inputs
- Username : Username for the new account
- Password : Password for the account
- AddToAdmin : "Yes" or "No" - whether to add to Administrators group
Settings
- Creates standard local user account
- Optional administrator privileges
Behavior
- Validates inputs
- Creates local user account
- Optionally adds to Administrators group
- Reports final status
Security Notes
- Password visible in script - use RMM variables for production
- No secrets logged to output
Exit Codes
- 0: Success
- 1: Failure
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
Username : newuser
Add to Admin: No
[ OPERATION ]
--------------------------------------------------------------
Creating user account...
User created successfully
[ RESULT ]
--------------------------------------------------------------
Status : Success
User : newuser
Admin : No
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- 2025-11-29 v1.0.0 Initial Style A implementation
Links
- View Script Source
- Scripts - Back to script index