how to add user to the doman admins group through powershell code example
Example 1: popwershell add local user
$Password = Read-Host -AsSecureString
New-LocalUser "User03" -Password $Password -FullName "Third User" -Description "Description of this account."
Example 2: how to add a group windows powershell
New-LocalGroup
[-Description <String>]
[-Name] <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]