Windows Vista Forums

PowerShell Active Directory Groups_Users Issue.
  1. #1


    Chris Guest

    PowerShell Active Directory Groups_Users Issue.

    I'm using the QUEST AD plug in and having an issue. When I pull the data,
    I'm missing some groups users.
    What my issue is, if I'm running this pull against domain ABC, if a member
    from the XYZ domain is a member of an ABC group, it does not grab information
    on the user; simply leaves it blank. It only list users which are in the
    same domain as the group, not external domains.



    Get-QADGroup -service 'DOMAIN_ABC.DOMAIN' -sizeLimit 0 | select
    @{name="GroupName";expression={$_.name}} -expand members | select
    GroupName,@{n='Member';e={ (Get-QADObject $_).sAMAccountName
    }}

      My System SpecsSystem Spec

  2. #2
    sapienscripter's Avatar

    Scripting Guru
    Join Date : Jun 2008
    Syracuse, NY
    Posts : 59
    Vista Ultimate 32bit
    Local Time: 12:49 PM
    usa us new york

     

    Re: PowerShell Active Directory Groups_Users Issue.

    I don't have a multiple domain setup to test right now. Does it make a difference if you query a global catalog server?

      My System SpecsSystem Spec

  3. #3


    Chris Guest

    Re: PowerShell Active Directory Groups_Users Issue.

    ....That I'm unsure of. Have not tried. Is possible, that would probably be
    a better solution since I have one ps1 file per domain (10+).....

    Any suggestions..>?




    "sapienscripter" wrote:

    >
    > I don't have a multiple domain setup to test right now. Does it make a
    > difference if you query a global catalog server?
    >
    >
    > --
    > sapienscripter
    >
    > Now Available: '-Managing Active Directory with Windows PowerShell:
    > TFM-'
    > (http://www.scriptingoutpost.com/p-39...shell-tfm.aspx)
    >
    > [image: http://www.scriptinganswers.com/_images/logo_mvp.gif]
    >

      My System SpecsSystem Spec

  4. #4


    Jacob Saaby Nielsen Guest

    Re: PowerShell Active Directory Groups_Users Issue.

    Hello Chris,

    what types are the groups ? Domain Local ? Universal ? Etc...

    Try making them universal if they're not. It's what's recommended these days
    anyway.
    See if that changes things for you

    --
    Kind Regards,
    Jacob Saaby Nielsen
    http://www.ijacob.info

    PowerShell trouble ? http://www.powershellcommunity.org

    > ...That I'm unsure of. Have not tried. Is possible, that would
    > probably be a better solution since I have one ps1 file per domain
    > (10+).....
    >
    > Any suggestions..>?
    >
    > "sapienscripter" wrote:
    >

    >> I don't have a multiple domain setup to test right now. Does it make
    >> a difference if you query a global catalog server?
    >>
    >> -- sapienscripter
    >>
    >> Now Available: '-Managing Active Directory with Windows PowerShell:
    >> TFM-'
    >> (http://www.scriptingoutpost.com/p-39...irectory-with-
    >> windows-powershell-tfm.aspx)
    >>
    >> [image: http://www.scriptinganswers.com/_images/logo_mvp.gif]
    >>


      My System SpecsSystem Spec

  5. #5


    Jacob Saaby Nielsen Guest

    Re: PowerShell Active Directory Groups_Users Issue.

    Hello Chris,

    btw I just thought of something. How about using the UserPrincipalName instead
    of the samaccountname ?
    The UPN consists of user@xxxxxx, and unless you've actively been changing
    it, the domain part should be
    the domain the user is in (as I understand it, you don't necessarily have
    to use the actual domain name, as
    long as the UPN is unique).

    If nothing else, it gives you a unique identifier for the user, which samaccountname
    isn't, when we're talking
    multiple domains.

    $(Get-QADUser "user").UserPrincipalName

    --
    Kind Regards,
    Jacob Saaby Nielsen
    http://www.ijacob.info

    PowerShell trouble ? http://www.powershellcommunity.org

    > I'm using the QUEST AD plug in and having an issue. When I pull the
    > data, I'm missing some groups users. What my issue is, if I'm running
    > this pull against domain ABC, if a member from the XYZ domain is a
    > member of an ABC group, it does not grab information on the user;
    > simply leaves it blank. It only list users which are in the same
    > domain as the group, not external domains.
    >
    > Get-QADGroup -service 'DOMAIN_ABC.DOMAIN' -sizeLimit 0 | select
    > @{name="GroupName";expression={$_.name}} -expand members | select
    > GroupName,@{n='Member';e={ (Get-QADObject $_).sAMAccountName
    > }}


      My System SpecsSystem Spec

PowerShell Active Directory Groups_Users Issue. problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Active directory with sql server in powershell Martin PowerShell 3 03 May 2009
Making changes to Active Directory with Powershell Swackhammer1 PowerShell 0 13 Jan 2009
How do I delete an OU in Active Directory from Powershell. Johannes L PowerShell 3 19 May 2008
Powershell & Active Directory orphan PowerShell 3 03 May 2007
Active Directory support in PowerShell bill PowerShell 1 11 Jan 2007