I have now wasted a lot of time on this just can't see what I'm doing wrong I have looked all over the net and a lot of PowerShell guides use this and the examples work fine on my end as well but when I try this on my data it does not work...
$response = Invoke-WebRequest -Uri $APIURLaction -Headers $headers -Method $action -UseBasicParsing
$response
$response | Select-Object -Expand Content
Outputs
StatusCode : 200
StatusDescription : OK
Content : {"clientProperties":[{"clientProps":{"iSCSIPort":3260,"clusterType":0},"client":{"evmgrcPort":0,"cvdPort":8400,"clientEntity":
{"hostName":"CommServe","clientId":2,"clientName":"commserve","_typ...
RawContent : HTTP/1.1 200 OK
Content-Length: 267
Content-Type: application/json; charset=utf-8
Date: Mon, 15 Oct 2018 11:48:26 GMT
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
{"clientProperties":[{...
Forms :
Headers : {[Content-Length, 267], [Content-Type, application/json; charset=utf-8], [Date, Mon, 15 Oct 2018 11:48:26 GMT], [Server,
Microsoft-IIS/10.0]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml :
RawContentLength : 267
}hostName":"CommServe","clientId":2,"clientName":"commserve","_type_":3,"clientGUID":"6D658775-D8C1-4D1D-8D0A-42702AB75A63"
and as you can clearly see | Select-Object -Expand Content
does not return the content only the last line... the same goes for $response.Content
:(
And I can not figure out why hope you can help