调用WebRequest选择对象-扩展内容不会返回完整内容

时间:2018-10-15 11:53:15

标签: powershell

我现在已经浪费了很多时间,只是看不到我在做什么错 我在网上看了很多,许多PowerShell指南都使用了此功能,示例在我的端部也很好用,但是当我在数据上尝试使用它时,则无法使用...

$response = Invoke-WebRequest -Uri $APIURLaction -Headers $headers -Method $action -UseBasicParsing
$response
$response | Select-Object -Expand Content

输出

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"

并且您可以清楚地看到| Select-Object -Expand Content不会仅返回最后一行的内容... $response.Content也是如此:(

我不知道为什么希望你能提供帮助

0 个答案:

没有答案
相关问题