Tag Archives: GPO

Report GPOs with Script References

How quickly can you answer this question:  Which Group Policies reference batch files, vbscripts, or PowerShells?  What is the best way to get the information and present it into a spreadsheet?  I did it by searching SysVol for the script.ini … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Launch the Group Policy Editor Outside the MMC

It is annoying that there isn’t a command line for the Group Policy Editor.  To edit a GPO you must 1) open the Group Policy Management Console, 2) Open the list of Group Policies, 3) select the GPO you want … Continue reading

Posted in Group Policy Objects, PowerShell, Scripting, Windows Administration | Tagged | Leave a comment

Getting GPO GUID, Name from Active Directory

You don’t have to rely on the Group Policy Module to resolve the display name of a GPO from the GUID, or the GUID from the display name.  Here are two short functions that will get that information from Active … Continue reading

Posted in Active Directory, Functions, Group Policy Objects, PowerShell, Scripting, Scriptlets | Tagged , , , | Leave a comment

Clear GPO Cache on Remote Computer with PowerShell

Clearing the GPO cache on a computer may be the only way to fix a persistent problem.  Doing this involves deleting files, registry entries, and rebuilding the security database.  Clear-GPOCache.ps1 works by creating a custom batch file on the remote … Continue reading

Posted in Active Directory, Batch, Group Policy Objects, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Update GPOs with Newer Version

If you use GPOs to enforce baselines, you may find that your enterprise is moving from version 1.1 to version 1.2 of a GPO.  Unfortunately for you, version 1.1 linked in a dozen places.  Wouldn’t you rather just you search … Continue reading

Posted in Alan's Favorites, My Best, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Get All GPOs Linked to an OU

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 … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Windows Administration | Tagged , | Leave a comment

Reset GPO Cache

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 … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Windows Administration | Tagged , | Leave a comment

Get Resultant Set of Polices (RSOP) with User Selection

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 … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

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

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 … Continue reading

Posted in Group Policy Objects | Tagged | Leave a comment

Compare Group Policy Objects

Our Active Directory lead recently complained to me that he didn’t have a good way to compare Group Policy Objects.  I had already written the Group Policy Reporter, which exports GPOs to HTML files, and it occurred to me that … Continue reading

Posted in Active Directory, PowerShell, Windows Administration | Tagged | Leave a comment