用户

检索 Active Directory 用户

Get-ADUser -Identity JohnSmith

检索与用户关联的所有属性

Get-ADUser -Identity JohnSmith -Properties *

检索用户的选定属性

Get-ADUser -Identity JohnSmith -Properties * | Select-Object -Property sAMAccountName, Name, Mail

新 AD 用户

New-ADUser -Name "MarySmith" -GivenName "Mary" -Surname "Smith" -DisplayName "MarySmith" -Path "CN=Users,DC=Domain,DC=Local"