Tuesday, August 19, 2014

Modifying the Manager field in AD in bulk..

A quick PowerShell script that will allow you to modify the Manager field in user properties in AD.

get-aduser -filter * -searchbase "ou=test,dc=domain,dc=com" | set-aduser -manager "JBlow"


Or for the entire domain if you are running a small shop:

get-aduser -filter * | set-aduser -manager "JBlow"

The Manage value must be either a SamAccountName or Distinguished Name.

No comments:

Post a Comment