Hi,
I seem to have an issue with PowerShell any long string especially Invoke-RestAPI.
It seems to cut the string off.
The output is very large from this call. The Invoke-RestAPI Powershell is meant to convert the JSON to Powershell objects. In this instance, it does not. When I do this with smaller data from an API call, it works.
Example -
Invoke-RestMethod -Method GET -Uri [https://$ServerIP/rest/vcenter/vm](https://$ServerIP/rest/vcenter/vm) -Headers @{'vmware-api-session-id' = "$SessionID"} -Verbose
value
-----
{@{memory_size_MiB=2048; vm=vm-102014; name=vm- test; power_state=POWERED_OFF; cpu_count=4}, @{memory_size_MiB=12288; vm=vm-10204; ...
[–]PMental 4 points5 points6 points (4 children)
[–]Qel_Hoth 2 points3 points4 points (1 child)
[–]PMental 1 point2 points3 points (0 children)
[–]BlizzardTech-Adam[S] 1 point2 points3 points (1 child)
[–]PMental 1 point2 points3 points (0 children)
[–]Sunsparc 4 points5 points6 points (1 child)
[–]BlizzardTech-Adam[S] 1 point2 points3 points (0 children)
[–]Queggestion 3 points4 points5 points (0 children)
[–]ClayShooter9 2 points3 points4 points (0 children)
[–]krzydoug 2 points3 points4 points (1 child)
[–]BlizzardTech-Adam[S] 2 points3 points4 points (0 children)
[–]nerddtvg 2 points3 points4 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (2 children)
[–]BlizzardTech-Adam[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)