Condividi tramite


Remove-WBSystemState

Remove-WBSystemState

Removes the system state components from the backup policy.

Syntax

Parameter Set: Default
Remove-WBSystemState [-Policy] <WBPolicy> [ <CommonParameters>]

Detailed Description

The Remove-WBSystemState cmdlet removes the system state components from a policy contained in the WBPolicy object. Depending on what the WBPolicy object includes, you may still backup some of the components that are part of the system state, but you may not be able to use the components in a system state recovery.

The WBPolicy object must be in edit mode. To put the WBPolicy object in edit mode for a policy that is the scheduled backup policy, use the Get-WBPolicy cmdlet with the Editable parameter. The New-WBPolicy cmdlet creates a new WBPolicy object that is already in edit mode.

To use this and any other Windows Server 2012 Backup cmdlets, you must be a member of the Administrators group or Backup Operators group.

Parameters

-Policy<WBPolicy>

Specifies the backup policy WBPolicy object to update.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • WBPolicy

    The Remove-WBSystemState cmdlet queries the WBPolicy object to determine whether the WBSystemState object is present. The cmdlet does nothing if the WBSystemState object is not already present. The cmdlet removes the WBSystemState object if it is present.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

    None

Examples

Example 1: Remove system state from the backup policy

This example removes the system state components from the WBPolicy object.

The first command stores the results of the Get-WBPolicy cmdlet in the variable named $Policy.

The second command removes system state components from the backup policy in the variable $Policy.

PS C:\> $Policy = Get-WBPolicy
PS C:\> Remove-WBSystemState -Policy $Policy

Add-WBSystemState

Get-WBPolicy

Get-WBSystemState