Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How do I get a list of "Manager" and "Department" using Powershell? AD or Exchange.

$
0
0

I'm looking to get a simple printout of all users with a custom attribute.  Included in this printout I need the Manager and Department displayed.  How do I do this?

In Exchange, I've tried this:

Get-Mailbox -filter 'CustomAttribute15 -eq "cee contact"' | select Name, Alias, customAttribute3, manager, department

This prints out my Name, Alias, and customAttribute3 with no problems, however, the manager and department are blank.  It appears that Exchange PowerShell does not want to list this information.

I've tried playing around with a few powershell commands with Get-ADUser in Active Directory powershell, but still not getting the Manager or Department (in fact, I can't even figure out how to list the customAttribute3 in AD PS).

Is there a powershell command (in either Exchange or AD) I can use to get the Manager and Department info listed?  Any help/direction would be appreciated!

Thank you,
Elizabeth


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>