January 2015
Intermediate to advanced
230 pages
5h 4m
English
So far, we have seen how to query the existing Group Policies using the Active Directory and Group Policy modules. Now, let's check how to create a new policy in Active Directory and link it to Organizational Units using PowerShell code.
To do this, we mainly need two cmdlets:
New-GPO: This will help in creating the Group PoliciesNew-GPLink: This will help in creating links to existing OUs, domains, and sitesTo create a new GPO, we just need to pass the name of the GPO to the
New-GPO cmdlet and it returns the GPO object details after creating the new GPO. The following command creates a new GPO with the name MyNewGPO:
New-GPO -Name "MyNewGPO"
It should look like following screenshot:
When a new GPO is created, ...
Read now
Unlock full access