Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
Active Directory
List of Users with Group Membership for a Manager
Last Post 05 Oct 2011 05:18 AM by
Klaas
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Jazo
New Member
Posts:3
03 Oct 2011 03:53 AM
Hi,
I'm trying to generate a list of users witch report to a Manager containing there group membership.
Fist I am creating a function that retrieves the users that reports to a manager user.
function Get-ADUsersReportTo { param ($Identity)
Get-QADUser -Manager $Identity | ForEach-Object { $_
get-ADUsersReportTo -Identity $_ }}
This works fine.
Get-QADUsersReportTo
| foreach-object -process {(get-qaduser $_).memberof | Get-QADGroup | select name }
Then I use the function and pipe it to retrieve the user’s membership.
This only gives me all the groups names from all users.
What I would like is to Display the Users DisplayName and under all the group memberships.
Any advice would be much appreciated. Thanks
Klaas
New Member
Posts:31
05 Oct 2011 05:18 AM
Get-QADUser -manager $identity | ForEach-Object {"`t" + $_.name;$_.memberof}
Would that be what you're looking for?
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Active Directory
--Exchange Server
--Lync Server
--SharePoint
--SQL Server
--System Center
--Non-Microsoft Products
--Books, Tools, and Videos
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
Active Directory
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2