VMware Cloud Community
vin01
Expert
Expert
Jump to solution

Some cmdlets are not working

Hi

I am not able to execute Get-VDSwitch on Powershell ISE window.

What might be the issue?

I am running latest version of powercli and powershell.

I am able execute the command Get-VirtualSwitch -Distributed

Below are the version info:

powercliversion.jpg

powershellversion.JPG

get-vdswitcherror.JPG

Regards Vineeth.K
Reply
0 Kudos
1 Solution

Accepted Solutions
RvdNieuwendijk
Leadership
Leadership
Jump to solution

PowerCLI is being converted from snap-ins to modules. The Add-PSSnapin cmdlet does not import modules. You can use the following command to import the PowerCLI modules into your ISE session:

Get-Module -Name VMware.* -ListAvailable | Import-Module

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition

View solution in original post

Reply
0 Kudos
4 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

It looks like you don't have the module VMware.VimAutomation.Vds imported in your ISE session. The Get-VDSwitch cmdlet is defined in this module. You should import all of the vmware.* modules in your ISE session, to be able to use all of the PowerCLI cmdlets.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
vin01
Expert
Expert
Jump to solution

Hi RvdNieuwendijl

Yes I add all the modules but still is not working..

Add-PSSnapin "*vmware*"

getsnapin.JPG

Regards Vineeth.K
Reply
0 Kudos
RvdNieuwendijk
Leadership
Leadership
Jump to solution

PowerCLI is being converted from snap-ins to modules. The Add-PSSnapin cmdlet does not import modules. You can use the following command to import the PowerCLI modules into your ISE session:

Get-Module -Name VMware.* -ListAvailable | Import-Module

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
Reply
0 Kudos
vin01
Expert
Expert
Jump to solution

ThanksSmiley Happy that worked.

Regards Vineeth.K
Reply
0 Kudos