Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

PowerCli SRM ListAssociatedVms throwing The Operation is not support on this Object

$
0
0

I am trying to run this simple script

 

$srmApi = $srm.ExtensionData

$protectionGroups = $srmApi.Protection.ListProtectionGroups()

 

$protectionGroups | % {

    $protectionGroup = $_   

    $protectionGroupInfo = $protectionGroup.GetInfo()

    $protectedVms = $protectionGroup.ListAssociatedVms()    ##Fails

    $protectedVms | % { $_.Vm.UpdateViewData() }

    $protectedVms | %{

        $output = "" | select VmName, PgName

        $output.VmName = $_.Vm.Name

        $output.PgName = $protectionGroupInfo.Name

        $output

    }

}

 

However, I get the error -

Exception calling "ListAssociatedVms" with "0" argument(s): "The operation is not supported on the object."

+ $protectionGroups[0].ListAssociatedVms <<<< ()

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException

 

The ListAssociatedVms method does exist as piping $protectionGroups[0] | gm shows it as a valid method.

 

Any ideas?

 

We are using vSphere Server 5.0.0 with PowerCli 5.5

 

Thanks in advance,
Jake


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>