Skip to content

Instantly share code, notes, and snippets.

@vScripter
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vScripter/4cfa84960b3fc022d940 to your computer and use it in GitHub Desktop.
Save vScripter/4cfa84960b3fc022d940 to your computer and use it in GitHub Desktop.
PowerCLI PSSnapins
<#
.DESCRIPTION
Load appropriate PowerCLI PSSnapins. These are based on PowerCLI 5.8 R1.
#>
[cmdletbinding()]
param()
PROCESS {
try {
Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.VimAutomation.Vds
Add-PSSnapin VMware.VimAutomation.License
Add-PSSnapin VMware.DeployAutomation
Add-PSSnapin VMware.ImageBuilder
Add-PSSnapin VMware.VimAutomation.Storage
} catch {
Write-Warning -Message "Error adding one of the PowerCLI PSSnapins - $_"
} # end try/catch block
} # end process block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment