VMware Cloud Community
Garimos
Enthusiast
Enthusiast
Jump to solution

PowerCLI - vSAN Commands doesn't work correctly

Hello everyone, currently I am confronted with the following problem:

When using the vSAN commands, I keep encountering the following error.

Screenshot 2022-01-19 130025.png

I am connected to one of our vCenter (6.7.0 - Build 18831049) in a test environment - Here I use a specially created a "SuperUser"-Permission Profile with all permissions. The rough configuration of vSAN can be seen in the attached images. 

 

After a longer research I have not found a solution yet.

 

I would like to thank you in advance and hope that you could help me as a beginner in PowerCLI.

 

Thank You

 

Greetings

Garimos

Labels (4)
0 Kudos
1 Solution

Accepted Solutions
pkvmw
VMware Employee
VMware Employee
Jump to solution

Hi all,

I've been working on the SR and thought I'll keep everyone updated. I noticed that there're too much modules present, compared to my local setup. So we went ahead removing all modules, reinstalling PowerCLI modules clean and the cmdlet was working again.

Basically, the steps were:

1. To remove all VMware modules:
# Get-Module -Name VMware* -ListAvailable | Uninstall-Module

2. Check if everything was removed:
# Get-Module -Name VMware* -ListAvailable

3. Check if there're still modules left
3.1. User modules: %UserProfile%\Documents\WindowsPowerShell\Modules
3.2. System-wide modules: C:\program files\WindowsPowerShell\Modules

4. Attempt a clean installation of PowerCLI

Regards,
Patrik

View solution in original post

11 Replies
LucD
Leadership
Leadership
Jump to solution

Which PowerCLI version are you using?


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

Garimos
Enthusiast
Enthusiast
Jump to solution

Currently i am using the following version:

VMware PowerCLI 10.1.0 build 8346946

Garimos_0-1642600721612.png

 

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Any specific reason you are using a rather old version (2018)?
Can you try to upgrade, and check if the issue is still there?


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

Garimos
Enthusiast
Enthusiast
Jump to solution

The vCenter Server and Windows Server are located in a sealed environment. I will download version 12.5.0 as a zip (Command Collection) and integrate it into the environment. Maybe that will be enough to solve the problem. If something comes up, I'll get back to you. 

0 Kudos
Garimos
Enthusiast
Enthusiast
Jump to solution

 After updating the modules, the following error appears : 

Screenshot 2022-01-19 170126.png

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Strange error.
The cmdlet works for me.

Are you sure the PowerCLI installation is correct?
Do a

Get-Module -Name VMware* -ListAvailable


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

Garimos
Enthusiast
Enthusiast
Jump to solution

Screenshot 2022-01-19 171120.png

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That looks ok.

I suggest opening an SR.


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

0 Kudos
Garimos
Enthusiast
Enthusiast
Jump to solution

All right then, I'll open a support request. Thanks a lot for your help!

0 Kudos
pkvmw
VMware Employee
VMware Employee
Jump to solution

Hi all,

I've been working on the SR and thought I'll keep everyone updated. I noticed that there're too much modules present, compared to my local setup. So we went ahead removing all modules, reinstalling PowerCLI modules clean and the cmdlet was working again.

Basically, the steps were:

1. To remove all VMware modules:
# Get-Module -Name VMware* -ListAvailable | Uninstall-Module

2. Check if everything was removed:
# Get-Module -Name VMware* -ListAvailable

3. Check if there're still modules left
3.1. User modules: %UserProfile%\Documents\WindowsPowerShell\Modules
3.2. System-wide modules: C:\program files\WindowsPowerShell\Modules

4. Attempt a clean installation of PowerCLI

Regards,
Patrik

LucD
Leadership
Leadership
Jump to solution

What do you mean by "I noticed that there're too much modules present, compared to my local setup."?
That looked to me as a normal 12.5 installation
Are you on an older version?


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

0 Kudos