PowerCLI version Differences

I would like to write a PowerCLI script, which gather VMs memory information from vCenter Server. I realized that if I put one of the VM into a variable, it have different property on different PowerCLI versions. I develop the script on PowerCLI 5.1 Release 1, and I run it on PowerCLI 5.0.1, and the result was not fine.

I put the VM in a $vm variable, and get the variable property with get-member. Here is the script part.

$vm = Get-VM -Name testsrv
$vm |gm

Here are the two screenshots.

PCLI_01

PCLI_02

After this I must use only the MemoryMB to avoid the version differences error.

1 thought on “PowerCLI version Differences”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s