Programming interfaces
PowerShell, by default, includes the Integrated Scripting Environment or ISE. This application provides instant help reference, command completion, syntax prompting, an integrated PowerShell interface, and coloring for visual reference. It does not support PowerCLI out of the proverbial box and adding it is also not available at this point in the lifecycle of the product; however, starting each script with the following code snippet will ensure PowerCLI commands are included in the running of the script.
Add-PSSnapinVMware.VimAutomation.Core -ErrorAction SilentlyContinue
This command calls the PowerCLI snap-in to ensure that even if the script is run outside of the PowerCLI interface, it can still reference all the commands in the snap-in. As of Version 6 of PowerCLI, the get-module –ListAvailable
command will now show the PowerCLI modules.