Create user with Powershell ISE window server

  Powershell script

New-ADUser `
-Name "sopuol Seng" `
-GivenName "sopuol" `
-Surname "Seng" `
-SamAccountName "sopuol" `
-UserPrincipalName "sopuol@sopuol.com.kh" `
-Path "OU=TEAM,DC=sopuol,DC=com,DC=kh" `
-AccountPassword (ConvertTo-SecureString "1" -AsPlainText -Force) `
-Enabled $true `
-PasswordNeverExpires $true
Copied!

  To View

Get-ADUser -Filter * | Select Name,SamAccountName,DistinguishedName
Copied!