Archive for the ‘Group Policy Objects’ Category

Get All GPOs Linked to an OU

Wednesday, March 1st, 2017

Get-AllGPOsLinkedToOU.ps1 returns a unique list of all GPO’s linked to an OU. You can also run a onelevel or subtree search to get a unique list of linked OUs at or below the selected OU. You are prompted for the domain, and navigate to desired OU.
Script Text

Reset GPO Cache

Wednesday, March 1st, 2017

This script deletes the locally stored copies of GPOs and forces a GPUPdate on a computer. Reset-GPOCache.ps1 works by a remote connection to the registry provider to get the path to the Group Policy\History folder, then deletes the files beneath that path. This ensures a fresh application of group polices.

Script Text

Get Resultant Set of Polices (RSOP) with User Selection

Wednesday, March 1st, 2017

The Get-GPResultantSetOfPolicy cmdlet in the GroupPolicy module of PowerShell has a parameter for a user name.  Often I have no idea who has logged onto the computer.  Get-RSOP.ps1 uses WMI to give you a pick list of users on the remote computer and then passes that to the user parameter of Get-GPResultantSetOfPolicy.

Script Text

How to Edit the Path for Shares and Printers inside a GPO

Saturday, March 26th, 2016

Here is the unsupported method from Microsoft for editing the path for shares and printers inside a GPO.

From a server —
1) Backup the problem GPO to your desktop
2) Edit the gpreport.xml and backup.xml files
3) Import the edited GPO

The engineer said if you have to do both, update the path for the file shares first.

If we still had a lot to do, I’d write a script to automate this process
— but we don’t.