CHAPTER 11

Managing Group Policy

IN THIS CHAPTER

Installing the Group Policy Management Console cmdlets

Querying Group Policy Objects and creating reports

Automating the creation and manipulation of Group Policy Objects

Working with Group Policy Object backups

Managing Group Policy Object security

Throughout Part III of this book, you have seen many of the new modules that were introduced with Windows Server 2008 R2 that provide you with a Windows PowerShell way to work with server components that are traditionally very tricky or impossible to script against. Group Policy is another example of this. Prior to 2008 R2, Group Policy could be scripted via an API or a COM interface. With the release of 2008 R2, you can now use the Windows PowerShell module that is installed with the Group Policy Management Console (GPMC).

Installing and Using the Cmdlets

The GroupPolicy module is directly attached to the GPMC. To install the module on a computer, you must install or enable the GPMC on that computer.

Enabling the Module on Windows Server 2008 R2

To use the GroupPolicy module on Windows Server 2008 R2, you can install the module and the GPMC by running the following two lines of code:

Import-Module ServerManager
Add-WindowsFeature GPMC

Installing the Module on Windows 7

For Windows 7, you must download and install the Remote Server Administration Tools (RSAT). You can download these tools from www.microsoft.com/download/en/details.aspx?id=7887. After you have installed RSAT, you can ...

Get Windows PowerShell® 2.0 Bible 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.