Sometimes it’s useful to have opportunity to run and debug powerCLI scripts/functions from standard Powershell ISE
- install on AdminPC powerCLI
- open Powershell ISE
- copy and paste into command line below:
Import-Module VMware.DeployAutomation Import-Module VMware.ImageBuilder Import-Module VMware.VimAutomation.Cis.Core Import-Module VMware.VimAutomation.Common Import-Module VMware.VimAutomation.Core Import-Module VMware.VimAutomation.HA Import-Module VMware.VimAutomation.License Import-Module VMware.VimAutomation.Sdk Import-Module VMware.VimAutomation.Storage Import-Module VMware.VimAutomation.vds
if you need to have powerCLI modules in Powershell ISE always, then create under your user account powershell profile:
-
- new-item -path $profile -itemtype file -force
- powershell_ise $profile
- and add into your profile above commands, or just one line
.’C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1′ - save your powershell profile.