Need help on Powershell Script

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 years, 8 months ago.

  • Author
    Posts
  • #11112
    Profile photo of Vivek Sathyamohan
    Vivek Sathyamohan
    Participant

    Is there a way we can access different domain via powershell to retrieve information?
    Ex : domain A and B has the same security group but when I run my script if retrieves information only from domain A or Domain B based on the pc's domain membership.
    Any help on this would be great!

  • #11113
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    If you're using the ActiveDirectory module, just specify the name of the target domain in the -Server parameter, ie:

    Get-ADGroup -Server otherdomain.local -Filter *
    
  • #11124
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    You will need to supply credentials to the other domain as well unless they are in a single forest and you are a member of the Enterprise Admins group

You must be logged in to reply to this topic.