GPDomain.RestoreGpo Method (GpoBackup)
Restores a Group Policy object (GPO) to the domain from the specified GPO backup.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public Gpo RestoreGpo(
GpoBackup gpoBackup
)
public:
Gpo^ RestoreGpo(
GpoBackup^ gpoBackup
)
member RestoreGpo :
gpoBackup:GpoBackup -> Gpo
Public Function RestoreGpo (
gpoBackup As GpoBackup
) As Gpo
Parameters
gpoBackup
Type: Microsoft.GroupPolicy.GpoBackupA GpoBackup object that represents a GPO backup on the file system.
Return Value
Type: Microsoft.GroupPolicy.Gpo
Returns Gpo. The restored GPO.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | gpoBackup is null. |
Remarks
You can only restore a GPO to the domain in which the GPO was originally created because the operation restores the GPO with its original GPO GUID, policy settings, access control lists (ACLs), and links to Windows Management Instrumentation (WMI) filters.
The restore operation returns the contents of a specific GPO to the status it had when the backup was performed.
The restore operation does not modify links between the GPO and any SOMs. These links are attributes of their respective SOMs (scope of management).
The restore operation also does not modify WMI filters. However, because the link to a WMI filter is an attribute of the GPO, the restore operation restores the link to the WMI filter.
See Also
RestoreGpo Overload
GPDomain Class
Microsoft.GroupPolicy Namespace
Return to top