VMware Cloud Community
paullee92
Enthusiast
Enthusiast
Jump to solution

Update ps VMware.PowerCLI

I found there is latest VMware.PowerCLI version 13 as per attached screen shot.

But when i initiate update the module, i hit by an error :

PS C:\> Update-Module VMware.PowerCLI
Update-Module : Module 'VMware.PowerCL' was not updated because no valid module was found in the module directory. Verify that the module is located
in the folder specified by $env:PSModulePath.
At line:1 char:1
+ Update-Module VMware.PowerCL -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (VMware.PowerCL:String) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : ModuleNotInstalledOnThisMachine,Update-Module

##

When i checked my env PS Module, my output as per below:

S C:\> $env:PSModulePath
C:\Users\pl\OneDrive - moto.my\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

Please advise how may i resolve this

Reply
0 Kudos
1 Solution

Accepted Solutions
paullee92
Enthusiast
Enthusiast
Jump to solution

Hi LucD /Team,

I still had the same error even using the above option as per below:

PS C:\> Update-Module VMware.PowerCLI -Force
Update-Module : Module 'VMware.PowerCLI' was not installed by using Install-Module, so it cannot be updated.
At line:1 char:1
+ Update-Module VMware.PowerCLI -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (VMware.PowerCLI:String) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module

 

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Looks like you might have made a typo.

You type VMware.PowerCL instead of VMware.PowerCLI

Update-Module VMware.PowerCLI -Force

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
paullee92
Enthusiast
Enthusiast
Jump to solution

Hi LucD /Team,

I still had the same error even using the above option as per below:

PS C:\> Update-Module VMware.PowerCLI -Force
Update-Module : Module 'VMware.PowerCLI' was not installed by using Install-Module, so it cannot be updated.
At line:1 char:1
+ Update-Module VMware.PowerCLI -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (VMware.PowerCLI:String) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module

 

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

How did you install the current PowerCLI installation?
From a ZIP file?

Best approach would be to remove all PowerCLI folders manually.
Then use Install-Module to install fresh


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos