I am brand new to PowerShell and looking to create a script that clears the following attributes/fields by user not OU from the general, address, telephones, and organization tabs.
I am currently performing this process via the GUI (AD Users and Computers) and thought it would improve efficiency.
This is as far as I got:
$user = Read-Host "Enter user name"
Set-ADUser $user
Thank you,
You can try this:
$user = Read-Host "Enter User name"
Get-ADUser $user | Set-ADUser -Clear Attributes single quoted separated by comma IE 'Description','Office' etc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.