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 ...

Get PowerCLI Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.