Q. How can i set attributes in AD via PowerShell that are not covered by standard parameters?
A. Cmdlets such as New-ADUser and Set-ADUser support the most common attributes you may want to set but what about if you need to set other attributes? Fortunately the -add, -replace and -remove parameters for Set-ADUser can be leveraged to set any attribute. For example to set the Exchange location I would use (where $NewUser is the user object):
$NewUser | Set-Aduser -Replace @{msExchUsageLocation="US"}
0 comments
Hide comments