Hi all,
vCD version 5.6.2.2548647
Having issues running a script to disable org and vdc.
Disabling org works fine however disabling vdc throws an error as follows:
Part of code:
Get-Org $orgs[$i] | Set-Org -Enabled $false
Get-OrgVdc -Name $orgs[$i] | Set-OrgVdc -Enabled $false
Return for the last line:
Set-OrgVdc : 2/8/2016 2:53:23 PM Set-OrgVdc The specified Href
'<URL>/api/Internal errror: ComposeOperationHref() : serviceUrl is not prefix of
sourceHref' is not valid.
At C:\Scripts\new.ps1:25 char:5
+ Set-OrgVdc -OrgVdc $orgs[$i] -Enabled $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-OrgVdc], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.Cloud.Commands.Cmdlets.SetOrgVdc
Any suggestions?
Thanks,
Your second command will only work if your OrgVdc has the same name as your Org. Otherwise you should use:
Get-Org -Name $orgs[$i] | Get-OrgVdc | Set-OrgVdc -Enabled $false
Hi RvdNieuwendijk,
Thanks for your reply, the org and VDC are in fact the same.
Also tried the command you suggested and I still receive the same error.
Any suggestions?
Thanks
I'll try RestAPI for now and see how that goes.