Managed Reference for Windows Server Backup PowerShell Command Classes

Windows Server Backup can use Windows PowerShell cmdlets to create and manage backups in Windows Server 2008 R2. This topic describes the following elements:

WSB PowerShell Classes

Namespace: Microsoft.Windows.ServerBackup.Commands

DLL: wsbcmdlet.dll

The following Windows Server Backup command classes are implemented by Windows PowerShell. These classes are included in this software development kit (SDK) for completeness only. The members of these classes cannot be used directly nor should they be used to derive other classes.

ClassDescription

AddWBBackupTargetCommand

Adds the WBBackupTarget object, which specifies backup storage locations, to the backup policy (WBPolicy object).

For detailed information about the parameters and for examples, see the Add-WBBackupTarget cmdlet.

AddWBBareMetalRecoveryCommand

Adds the needed items to the backup policy to enable you to perform a bare metal recovery (BMR) later with backups created using that policy.

For detailed information about the parameters and for examples, see the Add-WBBareMetalRecovery cmdlet.

AddWBFileSpecCommand

Adds the WBFileSpec object, which specifies the items to include or exclude from a backup, to the backup policy.

For detailed information about the parameters and for examples, see the Add-WBFileSpec cmdlet.

AddWBSystemStateCommand

Adds the items needed to the backup policy, so that later you can use backups created with this policy to perform a system state recovery.

For detailed information about the parameters and for examples, see the Add-WBSystemState cmdlet.

AddWBVolumeCommand

Adds the list of source volumes to the backup policy.

For detailed information about the parameters and for examples, see the Add-WBVolume cmdlet.

GetWBBackupSetCommand

Gets the list of backups (WBBackupSet objects) that were created for a server and stored at a location that you specified.

For detailed information about the parameters and for examples, see the Get-WBBackupSet cmdlet.

GetWBBackupTargetCommand

Gets the locations for storing backups that you specified as part of the backup policy.

For detailed information about the parameters and for examples, see the Get-WBBackupTarget cmdlet.

GetWBBareMetalRecoveryCommand

Gets the value that indicates whether the ability to perform BMRs from backups has been added to the backup policy.

For detailed information about the parameters and for examples, see the Get-WBBareMetalRecovery cmdlet.

GetWBDiskCommand

Gets the list of internal and external disks that are online for the local computer.

For detailed information about the parameters and for examples, see the Get-WBDisk cmdlet.

GetWBFileSpecCommand

Gets the list of WBFileSpec objects that are associated with the specified backup policy.

For detailed information about the parameters and for examples, see the Get-WBFileSpec cmdlet.

GetWBJobCommand

Gets the operation that is running (WBJob object).

For detailed information about the parameters and for examples, see the Get-WBJob cmdlet.

GetWBPolicyCommand

Gets the current backup policy that is set for the computer.

For detailed information about the parameters and for examples, see the Get-WBPolicy cmdlet.

GetWBScheduleCommand

Gets the current schedule for backups in the backup policy.

For detailed information about the parameters and for examples, see the Get-WBSchedule cmdlet.

GetWBSummaryCommand

Gets the history of the backup operations performed.

For detailed information about the parameters and for examples, see the Get-WBSummary cmdlet.

GetWBSystemStateCommand

Gets a Boolean value that indicates whether the ability to perform system state recoveries with the backups has been added to the backup policy.

For detailed information about the parameters and for examples, see the Get-WBSystemState cmdlet.

GetWBVolumeCommand

Gets the list of source volumes for the backup that is included in the backup policy.

For detailed information about the parameters and for examples, see the Get-WBVolume cmdlet.

GetWBVssBackupOptionsCommand

Gets a setting that specifies whether the backups created using the backup policy will be Volume Shadow Copy Service (VSS) copy backups or VSS full backups.

For detailed information about the parameters and for examples, see the Get-WBVssBackupOptions cmdlet.

NewWBBackupTargetCommand

Creates a WBBackupTarget object.

For detailed information about the parameters and for examples, see the New-WBBackupTarget cmdlet.

NewWBFileSpecCommand

Creates a WBFileSpec object.

For detailed information about the parameters and for examples, see the New-WBFileSpec cmdlet.

NewWBPolicyCommand

Creates a WBPolicy object.

For detailed information about the parameters and for examples, see the New-WBPolicy cmdlet.

RemoveWBBackupTargetCommand

Removes the backup storage locations (defined by the WBBackupTarget object) from the backup policy.

For detailed information about the parameters and for examples, see the Remove-WBBackupTarget cmdlet.

RemoveWBBareMetalRecoveryCommand

Removes the request to include all items needed for a BMR from the current backup policy.

For detailed information about the parameters and for examples, see the Remove-WBBareMetalRecovery cmdlet.

RemoveWBFileSpecCommand

Removes the list of items to include or exclude from a backup (as specified by the WBFileSpec object) from a backup policy.

For detailed information about the parameters and for examples, see the Remove-WBFileSpec cmdlet.

RemoveWBPolicyCommand

Removes the backup policy that is currently set.

For detailed information about the parameters and for examples, see the Remove-WBPolicy cmdlet.

RemoveWBSystemStateCommand

Removes the request to include all items needed for a system state recovery from the current backup policy.

For detailed information about the parameters and for examples, see the Remove-WBSystemState cmdlet.

RemoveWBVolumeCommand

Removes the volume to back up (specified by the WBVolume object) from the backup policy.

For detailed information about the parameters and for examples, see the Remove-WBVolume cmdlet.

SetWBPolicyCommand

Sets the WBPolicy object as the backup policy that will be used for scheduled backups.

For detailed information about the parameters and for examples, see the Set-WBPolicy cmdlet.

SetWBScheduleCommand

Sets the times to create daily backups for the backup policy.

For detailed information about the parameters and for examples, see the Set-WBSchedule cmdlet.

SetWBVssBackupOptionsCommand

Sets a value that specifies whether the backups that are created using the backup policy are VSS copy backups or VSS full backups.

For detailed information about the parameters and for examples, see the Set-WBVssBackupOptions cmdlet.

StartWBBackupCommand

Starts a one-time backup operation.

For detailed information about the parameters and for examples, see the Start-WBBackup cmdlet.

WBApplication

The WBApplication object identifies an application that is backed up as part of a volume or BMR backup. It contains the application’s identifier, its writer ID, and a list of its components.

WBApplicationComponent

The WBApplicationComponent object identifies the components that are reported by an application including the component name and the writer ID of the writer it is reporting to.

WBBackupSet

The WBBackupSet object identifies a backup created for a server and is stored at a location that the user specified at the time of the backup. It contains information about backup time and date, the computer that was backed up, the type of backup created, and which items were backed up.

WBBackupTarget

The WBBackupTarget object identifies a location for storing backups that can be set as part of the backup policy. Valid locations include disks, volumes, or remote shared folders.

To create WBbackupTarget objects that can be added to the WBPolicy object as backup storage locations, use the New-WBBackupTarget cmdlet.

The Get-WBBackupTarget cmdlet retrieves the locations for storing backups specified as part of the backup policy.

WBDisk

The WBDisk object identifies disks that can be added to the backup policy (WBPolicy object) as backup targets.

To specify disks as backup storage locations, use the New-WBBackupTarget cmdlet.

To retrieve the list of internal and external disks that are online for the local computer, use the Get-WBDisk cmdlet.

WBFileSpec

The WBFileSpec object defines what items will be included or excluded from WSB backups using the WBPolicy.

To define and apply changes to the backup policy, use the New-WBFileSpec and the Add-WBFileSpec cmdlets.

WBItem

The WBItem object defines the backup items in a WBJob object. The WBItem inside WBJob can be a single object or a list of other WBItems. To see the list of possible WBItem types, see WBItemType.

To get the currently running or previous backup operation, use the Get-WBJob cmdlet.

WBJob

The WBJob object defines the currently running or previous backup operation. It contains information about the job type, start time, end time, and the state of the operation.

WBPolicy

The WBPolicy object is used to store the backup policy for a computer. It contains information about the volumes included in the policy, files in the backup, the backup target, and scheduled time.

WBSummary

The WBSummay object stores a summary of the backup operations performed including information about when the next backup is scheduled, details for the last backup, and details of the last successful backup.

To retrieve the history of backup operations performed, use the Get-WBSummary cmdlet.

WBVolume

The WBVolume object stores information about a volume including the volume label, mount path, free space and total space.

To retrieve the list of source volumes for the backup that are included in the backup policy, use the Get-WBVolume cmdlet.

 

WSB Enumerations

The following enumerations are used by the WSB classes. These enumerations are included in this SDK for completeness only.

EnumerationDescription

CurrentOperation

Defines the possible types of a backup operation. The possible types are Backup, Recovery, and No Operation.

DiskProperties

Defines the possible properties of a Disk (WBDisk object). The possible properties are External, Dynamic, ValidTarget, ContainOemPartition, ContainsCriticalVolume, and None.

RecoverableItems

Defines the possible values of recoverable items from a backup (WBBackupset object). The possible values are Volumes, SystemState, Applications, Files, BareMetalRecovery, and None.

TargetType

Defines the possible types of a backup target (WBBackuptarget object). The possible types are Volume, Disk, Network, Shiny, and None.

VolumeProperties

Defines the possible properties a volume (WBVolume object). The possible properties are Critical, ValidSource, ReadOnly, IsExtensibleFirmwareInterfaceSystemPartition, IsOnDynamicDisk, IsOnDiskWithCriticalVolume, and None.

VssBackupOptions

Defines the possible types of a backup. The possible types are VssCopyBackup and VssFullBackup.

WBItemState

Defines the possible states of a WBItem object. The possible states are NotStarted, Running, and Completed.

WBItemType

Defines the possible types of a WBItem object. The possible types are VolumeList, ConsistencyCheck, SystemState, BareMetalRecovery, Volume, Application, Component, ConsistencyCheckResult, and None.

WBJobState

Defines the possible states of a WBJob object. The possible states are Unknown, NotRunning, Running, and Completed.

WBJobType

Defines the possible types of a WBJob object. The possible types are Backup, Recovery, and None.

 

 

 

Show: