- This topic has 2 replies, 2 voices, and was last updated November 8, 2019 by Colleen O.
Error getting VM NIC data
The forum ‘Scripting and APIs’ is closed to new topics and replies.
Hi I am trying to run a script to Export of VM/VPG data I found on this forum. Everything but the section to gather NIC data runs here are the commands
$GetVMSettingNICsURL = $baseURL+”vpgSettings/”+$VPGSettingsIdentifier+”/vms/”+$VMIdentifier+”/nics”
$GetVMSettingNICs = Invoke-RestMethod -Method Get -Uri $GetVMSettingNICsURL -TimeoutSec 100 -Headers $zertoSessionHeader_XML -ContentType $TypeXML
there error is:
Invoke-RestMethod : Failed parsing ‘xxxxxxxxxx-75fc-4f25-a44d-a54af1dc11ed.vm-xxxxxx’ as a valid VPG Settings identifier.
At \\childrens\files\set\Zerto\PowerShellPrograms\GetZertoData.ps1:368 char:21
+ … ttingNICs = Invoke-RestMethod -Method Get -Uri $GetVMSettingNICsURL – …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
I get this error whether I run the script or plug in actual data.
Does anyone have any insight on why this command fails?
Thank you.
Hi Colleen,
I happen to run into this issue as well when running Zerto 7.0. This was a bug in the API, but has been resolved in Zerto 7.5.
Thanks,
Wes
Thank you Wes,
We are currently at 7.0u2p1 and are planning to update to 7.5u1 in the next few weeks.
The forum ‘Scripting and APIs’ is closed to new topics and replies.