I developed a script to take snapshot on VM and delete older snapshot regularly. I used variable $snapshots to receive data from Get-Snapshot command, then determine how many existing snapshots according to return of $snapshots.count. Somehow the script always ran incorrect behavior. When I deep looked into $snapshots, I found a interesting things.
Computer A, $snapshots.count return nothing if no, or one snapshot received.
Computer B, $snapshots.count returned 0 if no, or returned 1 if one snapshots received.
Then I checked out $PSVersionTable, found computer A powershell version is 2.0, B is 3.0, looks like this is a bug in 2.0.
The issue got fixed after upgrade to 3.0, one more benefit is I got performance improve to load PowerCLI components after upgrading.
You could install Widnows Management Framework 3.0 to upgrade PowerShell. I tested it on PowerCLI 5.5 Update1.