Error gridview via Get-AzWvdHostPool

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 443
Last visit: Thu Mar 04, 2021 2:21 am
Has voted: 1 time

Error gridview via Get-AzWvdHostPool

Post by stevens »


I'm loading Get-AzWvdHostPool in a gridview but then get error
Screenshot_1.png (6.91 KiB) Viewed 374 times
Though error, it loads fine but errors keep popping up. Also when I close them, they reappear;
When I load limited set of properties via (Azure cmdlet to get hostpools from WVD) Get-AzWvdHostPool | select Name, HostPoolType, LoadBalancerType, MaxSessionLimit it loads without errors but I'd need all values

Can't I simply ignore the errors/preventing popups (could find out which property is the wrong type but that wouldn't help me a lot, it's a value I get via the cmdlet)?


Posts: 14704
Last visit: Sat Feb 27, 2021 5:46 am
Answers: 8
Has voted: 2 times
Been upvoted: 6 times

Re: Error gridview via Get-AzWvdHostPool

Post by jvierra »

That happens when you try to insert an object into a field. You must only insert value type or objects that cast to strings.