Using Group Policy Management Console Class Library
This section includes step-by-step “how to” samples written in Microsoft Visual C# that illustrate how to use various classes and types from this library to accomplish a specific Group Policy Management Console (GPMC) task, such as backing up a Group Policy object (GPO), restoring GPOs, and so on. Additionally, most of the samples in this section include stand-alone code that can be run independently or pasted into a larger application and modified to the requirements of the application.
In This Section
Sample | Description and Main GPMC Classes Used |
---|---|
Illustrates how to back up all GPOs in the current domain using the GPDomain, GpoCollection, and Gpo classes. |
|
Shows how to restore a domain’s GPOs that have been backed up previously using the GPDomain, BackupDirectory, GpoBackupCollection, and GPSearchCriteria classes. |
|
Iillustrates using the GPMC Class Library to import a Group Policy object's (GPO) settings from a backed-up GPO using the GPDomain, GPSearchCriteria, BackupDirectory, and GpoBackupCollection classes. |
|
Demonstrates using the GPMC Class Library to list all unlinked GPOs for a specified domain using the GPDomain, GPSearchCriteria, and SomCollection classes. |