Linking a GPO

New GPOs do not do anything until they are linked to a location inside Active Directory. I have now recreated the MyNewGPO object, and we are going to link it to the OU called IT Department via the following command:

New-GPLink -name MyNewGPO -target "ou=IT Department,dc=mydomain,dc=local"

You can see that I had to specify not only the name of the OU, but also its location inside the directory. This ensures that the cmdlet can correctly identify the OU to which we are linking. Checking inside GPMC again, the IT Department OU now has a link to MyNewGPO:

Get Mastering Windows Group Policy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.