Leveraging what jkusky entered for GET and POST, I've created a sample HTTP Put function for the REST services in Cortex.  

The function requires a few parameters that are not listed

1.  URL to the "page" your are attempting to PUT to. example: http://myISE/storage/volumes/{id};  where {id} is the instance identifier of the resource you want to change/modify.

2.  Data you are attempting to modify listed as query strings within the URL: "size=<newsize>&name=<newname>"

Keep in mind that for HTTP PUT, you need to append the query string(s) to the end of the URI with the "?" delimiter, like this:

URI = "http://<ip>/storage/volumes/12345?name=Bob01&size=50"

As opposed to POST, which requires the query strings to be in the "request body" of the request.


function Execute-HTTPPutCommand()



[string]$target = $null


$username = "administrator"

$password = "mypass"

$webRequest = [System.Net.WebRequest]::Create($target)

$webRequest.ServicePoint.Expect100Continue = $false

$webRequest.Credentials = New-Object System.Net.NetworkCredential -ArgumentList $username, $password

$webRequest.PreAuthenticate = $true

$webRequest.Method = "PUT"

$requestStream = $webRequest.GetRequestStream()



    [System.Net.WebResponse]$resp = $webRequest.GetResponse();

    $rs = $resp.GetResponseStream();

    [System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $rs;

    [string]$results = $sr.ReadToEnd();

    return $results;



To use the function, add the required variables and call the function


$URL = "http://myise/storage/volumes/12345?name=TEST02"  (This will change the /volumes/12345 name to "TEST02")

Execute-HTTPPutCommand $URL


Have fun!