Protecting virtual machines
The Protect-SrmVm
function of the Meadowcroft.SRM
module will protect a virtual machine and put the virtual machine in an SRM protection group. The syntax of the Protect-SrmVm
function is as follows:
Protect-SrmVM [-ProtectionGroup] <SrmProtectionGroup>
[[-Vm] <VirtualMachineImpl>] [[-VmView] <VirtualMachine>]
[<CommonParameters>]
The -ProtectionGroup
parameter is required.
In the following example, we will add virtual machine VM1
to the protection group Protected VMs Protection Group
. First, we will retrieve the Protected VMs Protection Group
and save it in the variable $SrmProtectionGroup
:
PowerCLI C:\> $SrmProtectionGroup = Get-SrmProtectionGroup
-Name 'Protected VMs Protection Group'
Next, we will retrieve the view ...
Get Learning PowerCLI - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.