I need to create a new local user account, and then add them to the local Administrators group. Can this be done in PowerShell?
EDIT:
As of PowerShell 5.1 there cmdlet New-LocalUser
which could create local user account.
Example of usage:
Create a user account
New-LocalUser -Name "User02" -Description "Description of this account." -NoPassword
or Create a user account that has a password
$Password = Read-Host -AsSecureString
New-LocalUser "User03" -Password $Password -FullName "Third User" -Description "Description of this account."
or Create a user account that is connected to a Microsoft account
New-LocalUser -Name "MicrosoftAccount\usr name@Outlook.com" -Description "Description of this account."