locked
Quest report on users RRS feed

  • Question

  • Hello,

    I need to add a list of users to a share security but I would like to do it by a Group added instead of having all users listed one by one. I would like before creating a new group to confirm if there is a common group between all these users already... ( I am using QUEST Software)

    I am trying to list all Groups a list of users are "Member of"..

    I started with:

    Get-QADGroup -ContainsMember '<<UserName>>'| Export-Csv 'Share.csv'

    But this is not displaying the user name... and there are too many fields/columns in it... also I would like to do the command at once so something like:

    Get-QADGroup -ContainsMember 'User1, User2,...' | Select-object 'name', 'type', 'dn', 'Memberof' | export-csv 'Share.csv

    I need the user name and the group name for each users.. something like...

    user1 group1

    user1 group2

    user1 group3

    ...

    user2 group2

    user2 group5

    ....

    user3 group3

    ...

    second try...

    Get-QADUser | Where-Object name -in -Value "user1", "User2", ... | Select-Object "name", "MemberOf" | Export-Csv "Shareusers.csv"

    third try:

    Get-QADUser 'user1' | Select-Object -expand memberof
    You must provide a value expression on the right-hand side of the '-' operator.
    At line:1 char:38
    + Get-QADUser | Where-Object ($_.name - <<<< in -Value "User1", "User2","User3", | Select-Object
     -expand memberof
        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : ExpectedValueExpression


    still in progress

    any idea?

    Thanks,

    DOm


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager





    • Edited by Felyjos Monday, September 22, 2014 5:45 PM
    Thursday, September 18, 2014 4:30 PM

Answers

  • it works finally...

    Thanks, 

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    • Marked as answer by Felyjos Tuesday, January 20, 2015 2:57 PM
    Tuesday, January 20, 2015 2:57 PM

All replies

  • ?bump?

    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Friday, September 19, 2014 6:37 PM
  • hello,

    from this command

    Get-QADUser 'user1' | Select-Object -expand memberof

    which is working for one user:

    PS] H:\>Get-QADUser 'LastName, FirstName' | Select-Object -expand memberof
    N=Air Eligible Unenrolled,OU=Distribution Groups,OU=Groups,DC=ad
    N=Veeam Admins,OU=Security Groups,OU=Groups,DC=ad
    N=CABAS sharepoint read only users,OU=Security Groups,OU=Groups,DC=ad
    N=CTA_staff,OU=FIM Security Groups,OU=Groups,DC=ad
    N=All - Employees,OU=FIM Distribution Groups,OU=Groups,DC=ad
    N=MBFSCL1 Homeshare Users,OU=Distribution Groups,OU=Groups,DC=ad
    N=AirWatch - RRH,OU=FIM Security Groups,OU=Groups,DC=ad
    N=aw-auto-All-Employees,OU=FIM Security Groups,OU=Groups,DC=ad
    N=Auto-ExemptEmp,OU=FIM Security Groups,OU=Groups,DC=ad
    N=Auto-CareConnectProd,OU=FIM Distribution Groups,OU=Groups,DC=ad
    N=Veeam Reporting Users,OU=Security Groups,OU=Groups,DC=ad
    N=IT Ops Eng,OU=FIM Distribution Groups,OU=Groups,DC=ad
    N=EHR Citrix Level 2 Support,OU=EHR Groups,OU=Groups,DC=ad
    N=SNC Project Managers,OU=Distribution Groups,OU=Groups,DC=ad
    N=VPN-Auto-ALL-Users,OU=FIM Distribution Groups,OU=Groups,DC=ad
    N=Auto-MITS-PWM,OU=FIM Security Groups,OU=Groups,DC=ad
    N=Altiris Project Team,OU=Distribution Groups,OU=Groups,DC=ad
    N=Service-Now ITIL Users,OU=Distribution Groups,OU=Groups,DC=ad

    how to get the same information for a list of user not only user1Get-QADUser 'user1', 'user2' | Select-Object -expand memberof

    I have the user names in a csv file:

    DisplayName
    LastName1, FirstName1
    LastName2, FirstName2
    etc...
    

    or a text file

    "DisplayName"
    "LastName1, FirstName1"
    "LastName2, FirstName2"
    etc...

    Thnaks,

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager





    • Edited by Felyjos Tuesday, September 23, 2014 4:15 PM
    Monday, September 22, 2014 5:41 PM
  • Get-QADUser * | Select-Object -expand memberof 

    is giving me:

    CN=All - Employees,OU=FIM Distribution Groups,OU=Groups,DC=ad
    CN=EFS02Perms_Rd,OU=Security Groups,OU=Groups,DC=ad
    CN=AirWatch - RRH,OU=FIM Security Groups,OU=Groups,DC=ad
    CN=aw-auto-All-Employees,OU=FIM Security Groups,OU=Groups,DC=ad
    CN=Auto-ExemptEmp,OU=FIM Security Groups,OU=Groups,DC=ad
    CN=Auto-CareConnectProd,OU=FIM Distribution Groups,OU=Groups,DC=ad
    CN=Veeam Reporting Users,OU=Security Groups,OU=Groups,DC=ad
    CN=IT Ops Eng,OU=FIM Distribution Groups,OU=Groups,DC=ad
    CN=RDS TumorReg,OU=ClinNet Groups,OU=Groups,DC=ad


    but when trying to export in a csv 

    Get-QADUser * | Select-Object -expand memberof | Export-Csv h:\ResultsGroup.csv

    I am getting:

    #TYPE System.String
    Length
    80
    88
    96
    79
    76
    108
    51
    56
    

    why am I getting numbers and not the OU structure as the online command is giving me...?

    Thanks,

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Tuesday, September 23, 2014 4:34 PM
  • it works finally...

    Thanks, 

    Dom


    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    • Marked as answer by Felyjos Tuesday, January 20, 2015 2:57 PM
    Tuesday, January 20, 2015 2:57 PM