IGPMDomain2::RestoreStarterGPO method

Restores the Starter Group Policy object (GPO) from a GPMStarterGPOBackup object. You can restore a Starter GPO only to the domain in which the Starter GPO was originally created. This is because the operation restores the Starter GPO with its original Starter GPO ID and policy settings.


HRESULT RestoreStarterGPO(
  IGPMStarterGPOBackup *pIGPMTmplBackup,
  VARIANT              *pvarGPMProgress,
  VARIANT              *pvarGPMCancel,
  IGPMResult           **ppIGPMResult



Pointer to the GPMStarterGPOBackup object to restore.


Specifies a pointer to an IGPMAsyncProgress interface that allows the client to receive status notifications about the progress of the restore operation. The caller must create this interface and then pass the interface pointer in this parameter to receive asynchronous notifications. This parameter must be NULL if the client should not receive asynchronous notifications. The method runs asynchronously if this parameter is not NULL, and the method runs synchronously if NULL.


Receives a pointer to an IGPMAsyncCancel interface that the client can use to cancel the restore operation. This parameter is not returned if pvarGPMProgress is NULL.


Address of a pointer to the IGPMResult interface that represents the result of the restore operation. That interface contains pointers to an IGPMstarterGPO interface and to an IGPMStatusMsgCollection interface.

Return Value


Returns S_OK if successful. Returns a failure code if an error occurs.


Returns a reference to a GPMResult object.


Returns a reference to a GPMResult object.


A restore operation returns the contents of a specific GPO to the status it had when the backup was performed.

You must check the code that is returned by the IGPMResult::OverallStatus method as well as the one returned by this method to determine whether or not the operation succeeded. OverallStatus returns an overall status code for the operation. If no error occurred during the operation, it returns a success code. Otherwise, it returns a failure code.


Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See Also