Add-WBVirtualMachine
Adds a list of virtual machines to the backup policy.
Add-WBVirtualMachine
[-Policy] <WBPolicy>
[[-VirtualMachine] <WBVirtualMachine[]>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-WBVirtualMachine
[-Policy] <WBPolicy>
[-All]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Add-WBVirtualMachine cmdlet adds a list of virtual machines to a backup policy contained in the specified WBPolicy object.
PS C:\> $Policy = Get-WBPolicy
PS C:\> $VirtualMachines = Get-WBVirtualMachine
PS C:\> Add-WBVirtualMachine -Policy $Policy -VirtualMachine $VirtualMachines
This example adds the list of volumes in the $VirtualMachines variable to the WBPolicy object $Policy.
The first command stores the result of the Get-WBPolicy cmdlet in the $Policy variable.
The second command stores the result of the Get-WBVirtualMachine cmdlet in the $VirtualMachines variable.
The third command adds the virtual machines listed in the $VirtualMachines variable to the backup policy in the $Policy variable.
Indicates that all virtual machines on the computer are added to the policy.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a WBPolicy object that contains the backup policy to update.
Type: | WBPolicy |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an array of one or more virtual machines to add to the WBPolicy object.
Type: | WBVirtualMachine[] |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |