Scripting between Active Directory Forests with Two-Way Trust RRS feed

  • Question

  • I am creating a script to precreate computer account objects in my current forest/domain, I will call it domainA.local My challenge now is to run the same script within my current domain (DomainA.local) and signed in user (DomainA\User1) to create computer objects in another domain in a different forest, I will call it DomainB.local. Both forests have a two-way trust and my current user ID (DomainA\User1) have the necessary permission to perform this. Is this possible with powershell or I will have to create to separate script and run from each domain/forest respectively. My goal is to create a single script to accomplish this.

    Isaac Oben MCITP:EA, MCSE,MCC View my MCP Certifications

    Wednesday, July 18, 2012 8:43 PM


  • Sure, but this question isn't about powershell as much as it is about the modules you want to use.  The quest PS cmdlets for example have connect-QADService which allows you to connect to an AD forest of your choosing.  You can also use PS Remoting, though this may require a bit more setup.

    Mike Crowley | MVP
    My Blog -- Planet Technologies

    • Edited by Mike Crowley Thursday, July 19, 2012 3:35 AM
    • Proposed as answer by Yan Li_ Tuesday, July 24, 2012 6:07 AM
    • Marked as answer by Yan Li_ Monday, July 30, 2012 1:46 AM
    Thursday, July 19, 2012 3:04 AM