API Reference
Class
GpoBackupService
Creates COM-free backups of a GPO (LDAP metadata + SYSVOL content) into a single zip archive with a JSON manifest.
Inheritance
- Object
- GpoBackupService
Methods
public static FileInfo Backup(String domainName, Guid gpoId, DirectoryInfo destinationDirectory, String initiatedBy, String comment = null, Options options = null, CancellationToken cancellationToken = null) #Returns:
FileInfoCreates a backup archive for the specified GPO.
Parameters
- domainName System.String
- DNS domain name that owns the GPO.
- gpoId System.Guid
- GPO identifier.
- destinationDirectory System.IO.DirectoryInfo
- Directory where the backup archive is created.
- initiatedBy System.String
- Name recorded in the manifest as the initiator.
- comment System.String = null
- Optional comment recorded in the manifest.
- options ADPlayground.Gpo.GpoBackupService.Options = null
- Optional inclusion settings.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Backup archive file.
public static Task<FileInfo> BackupAsync(String domainName, Guid gpoId, DirectoryInfo destinationDirectory, String initiatedBy, String comment = null, Options options = null, CancellationToken cancellationToken = null) #Returns:
Task<FileInfo>Creates a backup archive for the specified GPO asynchronously.
Parameters
- domainName System.String
- DNS domain name that owns the GPO.
- gpoId System.Guid
- GPO identifier.
- destinationDirectory System.IO.DirectoryInfo
- Directory where the backup archive is created.
- initiatedBy System.String
- Name recorded in the manifest as the initiator.
- comment System.String = null
- Optional comment recorded in the manifest.
- options ADPlayground.Gpo.GpoBackupService.Options = null
- Optional inclusion settings.
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
Returns
Backup archive file.