Alternative to Get-ADDirectReports for direct user reporting. So close…

I have worked with a few people and come up with the script below. https://pastebin.com/0p8P3wSK

I do not want to install the Get-ADDirectReports function https://gallery.technet.microsoft.com/scriptcenter/Get-ADDirectReport-962616c6

I have tried a few things but I obviously have no idea what I am doing… Here is where I left off… https://pastebin.com/6yim2YNj

Thoughts?

Here is an original post from days ago

https://www.reddit.com/r/PowerShell/comments/6yxng2/looping_through_users_in_a_group/

EDIT: https://pastebin.com/FBxYcrLg

submitted by /u/adminiture
[link] [comments]

Leave a Reply