Reputation:
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,
Upvotes: 0
Views: 1370
Reputation: 15528
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
Upvotes: 0