You can create a simple report containing information about the protected virtual machines associated with an SRM server.

Verify that you are connected to a vCenter Server system.

Verify that you are connected to an SRM server.


List all protection groups associated with the SRM server.

$srmApi = $srmConnection.ExtensionData
$protectionGroups = $srmApi.Protection.ListProtectionGroups()

Generate a report of the protected virtual machines.

$protectionGroups | % {
    $protectionGroup = $_
    $protectionGroupInfo = $protectionGroup.GetInfo()
    # The following command lists the virtual machines associated with a protection group
    $protectedVms = $protectionGroup.ListProtectedVms()
    # The result of the above call is an array of references to the virtual machines at the vSphere API
    # To populate the data from the vSphere connection, call the UpdateViewData method on each virtual machine view object
    $protectedVms | % { $_.Vm.UpdateViewData() }
    # After the data is populated, use it to generate a report
    $protectedVms | %{
        $output = "" | select VmName, PgName
        $output.VmName = $_.Vm.Name
        $output.PgName = $protectionGroupInfo.Name
} | Format-Table @{Label="VM Name"; Expression={$_.VmName} }, @{Label="Protection group name"; Expression={$_.PgName} }