I saw this post where you discussed the locking issue
Re: Installing PowerCLI
That result was:
PS C:\Windows\system32> Get-ChildItem -Path 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\VMware*' -Recurse | Unbl
ock-File
PS C:\Windows\system32> Import-Module VMware.VimAutomation.Core
Unable to find type [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory].
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\VMware.VimAutomation.Core\net45\VMware.VimAutomation.Core.ps1:1
char:1
+ [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (VMware.VimAutom...eServiceFactory:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
Import-Module : Could not load file or assembly 'VMware.VimAutomation.Sdk.Interop, Version=12.0.0.2889,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.psm1:23
char:17
+ $binaryModule = Import-Module -Name $binaryModulePath -PassThru
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
I used the default module path for all users:
PS C:\Windows\system32> $env:PSModulePath
C:\Users\pjohns_apo\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0
)\Microsoft SQL Server\110\Tools\PowerShell\Modules\
PS C:\Windows\system32>
Unless maybe I need to specify
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\
instead of
C:\Windows\System32\WindowsPowerShell\v1.0
Available modules comes back as
PS C:\Windows\system32> Get-Module -Name VMware* -ListAvailable
Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 12.0.0.... VMware.CloudServices {Connect-Vcs, Get-VcsOrganizationRole, Get-VcsService, Get-VcsServiceRole...}
Script 7.0.0.1... VMware.DeployAutomation {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}
Script 7.0.0.1... VMware.ImageBuilder {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...}
Manifest 12.0.0.... VMware.PowerCLI
Script 7.0.0.1... VMware.Vim
Script 12.0.0.... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 12.0.0.... VMware.VimAutomation.Cloud {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}
Script 12.0.0.... VMware.VimAutomation.Common {Get-Task, New-OAuthSecurityContext, Stop-Task, Wait-Task}
Script 12.0.0.... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}
Script 12.0.0.... VMware.VimAutomation.Hcx {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}
Script 7.12.0.... VMware.VimAutomation.HorizonView {Connect-HVServer, Disconnect-HVServer}
Script 12.0.0.... VMware.VimAutomation.License Get-LicenseDataManager
Script 12.0.0.... VMware.VimAutomation.Nsxt {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicyService, Get-NsxtService}
Script 12.0.0.... VMware.VimAutomation.Sdk Get-ErrorReport
Script 12.0.0.... VMware.VimAutomation.Security {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServer, Add-TrustA
Script 11.5.0.... VMware.VimAutomation.Srm {Connect-SrmServer, Disconnect-SrmServer}
Script 12.0.0.... VMware.VimAutomation.Storage {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObjectToRepairQu
Script 1.3.0.0 VMware.VimAutomation.StorageUtility Update-VmfsDatastore
Script 12.0.0.... VMware.VimAutomation.Vds {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}
Script 12.0.0.... VMware.VimAutomation.Vmc {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}
Script 12.0.0.... VMware.VimAutomation.vROps {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}
Script 12.0.0.... VMware.VimAutomation.WorkloadMan... {Get-WMNamespace, Get-WMNamespacePermission, Get-WMNamespaceStoragePolicy, New-WMNamespace...}
Script 6.5.1.7... VMware.VumAutomation {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}