Need help on Powershell Script

Welcome Forums General PowerShell Q&A Need help on Powershell Script

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
5 years, 2 months ago.

  • Author
    Posts
  • #11112

    Participant
    Points: 0
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘Need help on Powershell Script’ is closed to new replies.