Automating the world one-liner at a time…
This month's TechNet Magazine has an article: Simplify Group Policy Administration with Windows PowerShell. They are good enough to include all the code as a download.
Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Just in case anyone is interested, I've got a free cmdlet,called get-SDMGPO, that wraps the GPMGPO object, on my website at www.gpoguy.com/powershell.htm. It reduces *some* of the complexity of having to call COM objects to get GP-related info.
With the release of Windows Server 2008R2, you can now manage Group Policy with the module that is installed with GPMC.