Which domain contoller is polled in Powershell query

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 3 months ago.

  • Author
    Posts
  • #6283

    by Christopher.Ellis at 2013-02-20 09:25:46

    Within powershell – How can I determine which Active Directory Domain Controller is being polled for information?

    for example C:> get-aduser christopher.ellis

    DistinguishedName : CN=Christopher.Ellis,OU=Head Office – 2540
    Enabled : True
    GivenName : Christopher
    Name : Christopher.Ellis
    ObjectClass : user
    ObjectGUID : 07ce018b-2fa5-4bf6-90df-3f7aa2818981
    SamAccountName : Christopher.Ellis
    SID : S-1-5-21-1140152784-10511339-5522801-6916
    Surname : Ellis
    UserPrincipalName : Christopher.Ellis@internal.XXXXX.ca

    Can I direct powershell to query a specific Domain controller? If so – how?

    by AlexBrassington at 2013-02-20 10:57:00

    To pick one you can use the Server parameter:

    [quote]The default value for the Server parameter is determined by one of the following methods in the order that they are listed:
    -By using Server value from objects passed through the pipeline.
    -By using the server information associated with the Active Directory PowerShell provider drive, when running under that drive.
    -By using the domain of the computer running Powershell.

    The following example shows how to specify a full qualified domain name as the parameter value.
    -Server "corp.contoso.com"

    Directory server values:
    Fully qualified directory server name
    Example: corp-DC12.corp.contoso.com
    NetBIOS name
    Example: corp-DC12
    Fully qualified directory server name and port
    Example: corp-DC12.corp.contoso.com:3268
    [/quote]
    http://technet.microsoft.com/en-us/libr ... 17241.aspx

    I don't know how you'd identify which server you're using by default though.

You must be logged in to reply to this topic.