Hi,
You can link the GPO to a specified OU using the New-GPLink cmdlet.
$sourceGPO = "TestGPO"
$targetGPO = "test_productionGPOname"
$ou = "OU=test, DC=contoso, DC=com"
Copy-GPO -SourceName $sourceGPO -TargetName $targetGPO
New-GPlink -Name $targetGPO -target $ou -LinkEnabled Yes
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.