Powershell User Management

Create a local user account (New-LocalUser)

> New-LocalUser -Name "User" -Description "Description of this account." -NoPassword
> New-LocalUser -Name testuser -NoPassword -UserMayNotChangePassword -AccountNeverExpires

> $password = ConvertTo-SecureString "pass_here" -AsPlainText -Force
> New-LocalUser "User03" -Password $password -FullName "Third User" -Description "Desc.here"

Get local user accounts (Get-Localuser)

> Get-LocalUser
> Get-LocalUser -Name "Admin"
> Get-LocalUser -Name "MicrosoftAccount\username@Outlook.com"

Creates a local security group (New-LocalGroup)

> New-LocalGroup -Name "SecurityGroupName"
> New-LocalGroup test

Show local groups

> Get-LocalGroup
> Get-LocalGroup users