Get the App
SLTechnology News&Howtos  ›  Servers  › 

AD- New user Command New-ADUser

Shulou Source: shulou.com Published: 2022-06-03 00:07:50 12月06日 Update

Learn from:

Teacher Xu Peng's AD Powershell series of video courses

Create an enabled user:

Required attributes:

Name

SamAccountName

UserPrincipalName

DisplayName

Path

AccountPassword

New-ADUser-SamAccountName test01-Name test01-UserPrincipalName test01@satid.com-DisplayName "test01"-Path "ou=Lab,dc=satid,dc=com"-AccountPassword (ConverTo-SecureString "Abc@123"-AsPlainTest-Force)-Enabled $true

Create 10 users in batch

For {$user= "user" + $ispun updated username + "@ satid.com" New-ADUser-SamAccountName $user-Name $user-UserPrincipalName $upn-DisplayName $user-Path "ou=Lab,dc=satid,dc=com"-AccountPassword (ConverTo-SecureString "Abc@123"-AsPlainTest-Force)-Enabled $true}

Tags: User necessity attribute teacher Video course Xu Peng Learning Command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MariaDB MySQL vpn Redmi