API Reference
Class
GpoBackupManager
Provides methods to back up and restore Group Policy Objects using native GPMC interfaces.
Inheritance
- Object
- GpoBackupManager
Constructors
public GpoBackupManager() #Methods
public Task<FileInfo> BackupAsync(String gpoName, String owner, String version, DirectoryInfo destination, CancellationToken cancellationToken = null) #Returns:
Task<FileInfo>Backs up a GPO and packages the result into a compressed archive.
Parameters
- gpoName System.String
- Name of the GPO.
- owner System.String
- Owner metadata stored with the backup.
- version System.String
- Version metadata stored with the backup.
- destination System.IO.DirectoryInfo
- Directory where the archive will be created.
- cancellationToken System.Threading.CancellationToken = null
- Token used to monitor for cancellation requests.
public GpoBackupInfo GetBackupInfo(FileInfo archive) #Returns:
GpoBackupInfoGets metadata stored in a backup archive.
Parameters
- archive System.IO.FileInfo
- Archive created by CancellationToken).
public Task RestoreAsync(FileInfo archive, String newDisplayName = null, CancellationToken cancellationToken = null) #Returns:
TaskRestores a GPO from a compressed archive.
Parameters
- archive System.IO.FileInfo
- Archive created by CancellationToken).
- newDisplayName System.String = null
- Optional new display name for the restored GPO.
- cancellationToken System.Threading.CancellationToken = null
- Token used to monitor for cancellation requests.