Home > PowerCLI, VMware > Suppressing VMware VIX Warnings when running Invoke-VMScript cmdlets

Suppressing VMware VIX Warnings when running Invoke-VMScript cmdlets

I have a practice of running up-to-date software.

Some scripts in PowerCLI which perform in-guest operations, depend on VMware VIX.

The latest version of VIX is 1.10.1.12915.

image

But PowerCLI needs 1.10.0.  Since i am running 1.10.1 (which is too new), PowerCLI will complain when you run the Invoke-VMScript cmdlet.

image

It’s a warning and not a big thing (since these things will work on version 1.10.1), but it’s not a nice thing when you have a bunch of these warnings in the middle of your output.

PowerShell’s standard behaviour is to continue on warnings, but display then on the console in yellow.  This can be changed to SilentlyContinue which means, continue on warnings and do not display them.

Add the –WarningAction SilentlyContinue parameter to the cmdlet and you’re set!  No more warnings!

image

Advertisements
Categories: PowerCLI, VMware
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: