Link to home
Start Free TrialLog in
Avatar of Indie101
Indie101

asked on

Looking for Powershell script that allows me to delete profile path for every AD user in OU

Looking for a powershell script that will allow me delete the profile path in profile tab for every AD user in a particular OU

Is it a case of using

Set-ADUser -Clear ProfilePath within OU
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Indie101
Indie101

ASKER

Thanks i get what if: Performing the operation "set" on target

If i add cn=testuser at start that will just take profile off that one yeah?
i get what if: Performing the operation "set" on target
That's the test mode as indicated above.
For testing with a single account, you can adjust the filter to use SamAccountName, or just go for the user's Identity
Still in test mode, will not change anything in AD until the -WhatIf is removed:
Get-ADUser -Identity testuser | Set-ADUser -Clear profilePath -WhatIf 

Open in new window

Super thanks very much :)