Our organization is mainly in to disaster recovery. We mainly manage the DR environment and Prod is managed by customer themselves,SRM is one of the technologies used for DR.
Hence we do not have required access on protected sites.
We have been planning to automate SRM tasks using powercli like fetching reports for protection group, protected VM status but by connecting from recovery site. I have observed that API called using powercli contacts vCenter MOB for any information. In this scenario if you need to fetch appropriate results one can connect to recovery site and get the desired results or we must connect via protected site and execute the required scripts.
When i execute Get-SRMProtectedVM I do not get the necessary details and I keep getting error along with the output as listed below. I was under a impression I would get VM name too but that does not seem to be the case.
Get-SrmProtectedVM : Exception calling "UpdateViewData" with "0" argument(s): "The object has already been deleted or has not been completely created"
At line:1 char:1
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-SrmProtectedVM
Vm : VMware.Vim.VirtualMachine
ProtectedVm : protected-vm-44339
PeerProtectedVm : protected-vm-55893
State : Shadowing
PeerState : Ready
NeedsConfiguration : False
Any leads would be very helpful.
I know this is an old post and you may have figured it out already but if you map the vm value you can use the get-view command to get the full object details.
$vm = get-srmprotectedvm -name "SERVER NAME" | select vm
Pretty sure that's the correct syntax.