• This topic has 1 reply, 1 voice, and was last updated March 26, 2018 by Chance B.

Unable to get VM nic settings (Powershell)

  • I’m trying to pull a copy of a vm’s nic settings by using the NICs API but I’m getting nothing back. I’ve verified a hundred times that the VPGSettings ID and the VM ID are valid. I’m able to pull VPG settings and VM settings without issue.

    My environment is replicated to a VCD. I’m trying to build a script to change all of the protected vms recovery networks.

    function Get-ZertoVMNICs ($xZertoSession, $vpgSettingsID, $vmSettingsID)
    {
         $xZertoSessionAPIURL = $xZertoSession.url + "/v1/vpgsettings/" + $vpgSettingsID + "/vms/" + $vmSettingsID "/nics"
         $xZertoSessionResponse = invoke-restmethod -uri $xZertoSessionAPIURL -headers $xZertoSession.token -contenttype "application/xml"
         return $xZertoSessionResponse
    }

    This is resolved. Typo on the return command in my actual code.

You must be logged in to create new topics. Click here to login