Export (0) Print
Expand All

Remove-WBVirtualMachine

Updated: June 3, 2013

Applies To: Windows Server 2012

Remove-WBVirtualMachine

Removes the list of virtual machines from the backup policy.

Syntax

Parameter Set: All
Remove-WBVirtualMachine [-Policy] <WBPolicy> [[-All]] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: WBVirtualMachine
Remove-WBVirtualMachine [-Policy] <WBPolicy> [[-VirtualMachine] <WBVirtualMachine[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-WBVirtualMachine cmdlet removes the list of virtual machines from the backup policy contained in the WBPolicy object.

Parameters

-All

Indicates whether to remove all virtual machines from the backup contained in the WBPolicy object.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Policy<WBPolicy>

Specifies the WBPolicy object that contains the backup policy to update.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualMachine<WBVirtualMachine[]>

Specifies an array of one or more virtual machines to be removed from the backup policy contained in the WBPolicy object.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

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

  • Windows.ServerBackup.Commands.WBPolicy

Outputs

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

  • Windows.ServerBackup.Commands.WBVirtualMachine[]

Examples

Example 1: Remove virtual machines from the backup policy

This example removes all virtual machines from the backup policy.

The first command calls the Get-WBPolicy cmdlet and assigns the result to the $Policy variable.

The second command removes the virtual machines from the backup policy in the $Policy variable.


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

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft