TestimoX

API Reference

Class

GpoBackupManager

Namespace ADPlayground.Gpo
Assembly ADPlayground
Modifiers sealed

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 requiredposition: 0
Name of the GPO.
owner System.String requiredposition: 1
Owner metadata stored with the backup.
version System.String requiredposition: 2
Version metadata stored with the backup.
destination System.IO.DirectoryInfo requiredposition: 3
Directory where the archive will be created.
cancellationToken System.Threading.CancellationToken = null optionalposition: 4
Token used to monitor for cancellation requests.
public GpoBackupInfo GetBackupInfo(FileInfo archive) #
Returns: GpoBackupInfo

Gets metadata stored in a backup archive.

Parameters

archive System.IO.FileInfo requiredposition: 0
Archive created by CancellationToken).
public Task RestoreAsync(FileInfo archive, String newDisplayName = null, CancellationToken cancellationToken = null) #
Returns: Task

Restores a GPO from a compressed archive.

Parameters

archive System.IO.FileInfo requiredposition: 0
Archive created by CancellationToken).
newDisplayName System.String = null optionalposition: 1
Optional new display name for the restored GPO.
cancellationToken System.Threading.CancellationToken = null optionalposition: 2
Token used to monitor for cancellation requests.