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,UserPrincipalName
Copied!

  Remove user

Remove-ADUser -Identity 'Path of User'
Copied!

  Move user

Move-ADObject `
-Identity "CN=Sopuol Seng,OU=TEAM,DC=sopuol,DC=com,DC=kh" `
-TargetPath "New Path"
Copied!