Looking Up Managers In AD Using Powershell

Jana Sattainathan shows how to use Powershell to look up a group of Active Directory users’ managers:

Today, I received a request to find the manager for a whole bunch of users. This was a list of names (not UserId’s) in a Excel worksheet.

It is not actually that complex to do it

  1. Locate the AD user based on the name

  2. Check the Manager property

  3. Lookup AD again for Manager to get the name

Click through for the script.  This does, of course, assume that the information is already in Active Directory somewhere.

Related Posts

Powershell Modules Everywhere

Kevin Chant has some thoughts on whether you should have SQL Server Powershell modules on every server: Recently I’ve seen recommendations about putting PowerShell modules on every SQL Server. I must admit it has got me thinking if this is indeed worthwhile. In addition, it makes me wonder if it’s actually better to put the […]

Read More

Determining Your OS in Powershell

Patrick Gruenauer shows how you can determine your operating system in Powershell Core 6 and Powershell 7: Recently, I discovered three PowerShell Core variables that could be very helpful when it comes to determining the operating system in PowerShell. PowerShell has become a cross-platfrom tool and can be installed on Linux or MacOs, too. So […]

Read More

Categories

February 2018
MTWTFSS
« Jan Mar »
 1234
567891011
12131415161718
19202122232425
262728