Code: Select all
$vcdOrgItem = Find-VBRvCloudEntity -Organization -Name $OrgName
$vcdHost = $vcdOrgItem.Path.Split('\')[0]
$vcd = Get-VBRServer -Name $vcdHost
$siteRef = ($vcd.Info.Options | Select-Xml -XPath '/root/VcdConnectionOptions/LocalSiteUid').Node.InnerXml
$hostSiteUid = [Veeam.Backup.Model.CVcdRef]::Make($siteRef)
$vcdOrg = New-Object -TypeName Veeam.Backup.Model.CVcdOrganization -ArgumentList $vcdOrgItem.VcdId, $hostSiteUid, $vcdOrgItem.VcdRef, $vcdOrgItem.Name
Now it complains TypeNotFound for the CVcdRef.
Code: Select all
$hostSiteUid = [Veeam.Backup.Model.CVcdRef]::Make($siteRef)
Unable to find type [Veeam.Backup.Model.CVcdRef].
At line:1 char:16
+ $hostSiteUid = [Veeam.Backup.Model.CVcdRef]::Make($siteRef)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Veeam.Backup.Model.CVcdRef:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
What's the solution to get over this?