• This topic has 0 replies, 1 voice, and was last updated November 4, 2020 by John M.

Error starting session

  • I’m getting the following error:

    “Message”:”Exception occurred in API: The property ‘username’ is not supported for this request. Please review the documentation for valid properties.”

    The script snippet that is causing this error is:

    #import and set credential variable
    $xmlPath = “$env:USERPROFILE\” + $userName + “.clixml”
    $zvmCredential = Import-Clixml -Path $xmlPath

    #create start session URL
    $zertoSessionURI = $baseURL + “session/add”f
    #Send request to start session; store as $zertoSessionResponse
    $zertoSessionResponse = Invoke-WebRequest -Uri $zertoSessionURI -Credential $zvmCredential -Body $body -Method POST -ContentType “application/json”
    Using debug tools, I’ve confirmed that the $zvmCredential object is getting generated correctly.  Furthermore, I’ve been using this technique for nearly a year.  There have been no edits to my script.  This script runs weekly to gather some data.  Today, all of the sudden it started failing.  I’ve attempted running in several other scripts that I’ve been using for months, an it’s failing there too.  I haven’t upgraded the ZVM (7.5u3) in several months, so there should be no changes in the API itself either.  Does anyone have any ideas?
You must be logged in to create new topics. Click here to login