Okay I am trying to add a user through PowerShell. Call it a learning experience, as I know how to do it through ADAC.
This is the script I am trying to use, but I keep getting errors.
$secpass = Read-Host "Password" -AsSecureString
New-ADUser -Name "User Name" -SamAccountName Uname
-UserPrincipalName "[email protected]" -AccountPassword $secpass
-Path "cn=Users,dc=Test,dc=com" -Enabled:$true
Any help would be greatly appreciated.
This is the script I am trying to use, but I keep getting errors.
$secpass = Read-Host "Password" -AsSecureString
New-ADUser -Name "User Name" -SamAccountName Uname
-UserPrincipalName "[email protected]" -AccountPassword $secpass
-Path "cn=Users,dc=Test,dc=com" -Enabled:$true
Any help would be greatly appreciated.