As I\'m reading in the PowerShell user guide, one of the core PowerShell concepts is that commands accept and return objects instead of text. So for example, runnin
@($output).Count does not always produce correct results.
I used the ($output | Measure).Count method.
I found this with VMware Get-VmQuestion cmdlet:
$output = Get-VmQuestion -VM vm1
@($output).Count
The answer it gave is one, whereas
$output
produced no output (the correct answer was 0 as produced with the Measure method).
This only seemed to be the case with 0 and 1. Anything above 1 was correct with limited testing.