本文共 1203 字,大约阅读时间需要 4 分钟。
You have to look at the Modules in PowerCLI 6.5.
When you wrote your Scripts with the PowerShell ISE you had to load the PSSnapins before.
Check which Module loaded via
Get-Module -Name VMware*
In 6.5 there are no longer PSSnapins! Now there are only Modules!
Before PowerCLI 6.5 you added your Snapins via
Add-PSSnapin VMware.VimAutomation.Core
In 6.5 you have to load the Modules one bye one via
Import-Module VMware.VimAutomation.CoreImport-Module VMware.VimAutomation.VdsImport-Module VMware.VimAutomation.CloudImport-Module VMware.VimAutomation.PCloudImport-Module VMware.VimAutomation.Cis.CoreImport-Module VMware.VimAutomation.StorageImport-Module VMware.VimAutomation.HorizonViewImport-Module VMware.VimAutomation.HAImport-Module VMware.VimAutomation.vROpsImport-Module VMware.VumAutomationImport-Module VMware.DeployAutomationImport-Module VMware.ImageBuilderImport-Module VMware.VimAutomation.License
Or you can load all Modules via
Get-Module -ListAvailable VMware | Import-Module
Otherwise you start the VMware Script witch is located under (default)
“C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1”
转载于:https://blog.51cto.com/549687/2140240