Here’s my quick addition to Kamran’s “How to export data from Active Directory using the free PowerGUI tool“:
If you might need to find users managed by someone more than once, there are a couple of ways you can make this simpler for your self:
A. Download and install free Org Chart powerpack, or
B. Follow these instructions to add a Direct Reports button to PowerGUI admin console:
1. Start PowerGUI admin console and browse to Active Directory / Users.
2. In the right-hand pane, right-click the category to which you want to add the action and pick New / Script Action from the shortcut menu.

3. In the New Action dialog box, type in the action name (e.g. Direct Reports), and script:
$input | ForEach-Object {
Get-QADUser -Manager $_
}
(The script is quite trivial: for each user account currently selected in the PowerGUI grid, we get the list of AD users which have this object specified as Manager).

3. On that same dialog box, click the Display Configuration button, and then in the Display results group, select the Display the results in a nested view option.
This tells PowerGUI that your action outputs objects to the grid (which it does – we need to see the reports selected user has!)

4. That’s it! Click OK on both dialog boxes, select the user account whose reports you need to see, and click your newly added Direct Reports action.
Big thanks to Kamran for posting his original tip and video.
Tags: AD, AD cmdlets, Active Directory, Blogosphere, PowerGUI, PowerShell, cmdlets
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |