VMware Cloud Community
SimonLong
VMware Employee
VMware Employee

VMware.VMC.NSXT confusion with VMware.Vmc and VMware.vimAutomation.Vmc Modules

Hey guys, I am working with some Networking automation within VMC on AWS. I am using the following module to connect to NSX-T in VMC: VMware.VMC.NSXT. When I try to run the following command: Connect-NSXTProxy -RefreshToken $RefreshToken -OrgName $OrgName -SDDCName $SDDCName I get errors.

Error:

Get-VMCOrg: C:\Program Files\WindowsPowerShell\Modules\VMware.VMC.NSXT\VMware.VMC.NSXT.psm1:29:19

Line |

  29 |          $orgId = (Get-VMCOrg -Name $OrgName).Id

     |                    ~~~~~~~~~~

     | The term 'Get-VMCOrg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Get-VmcSddc: C:\Program Files\WindowsPowerShell\Modules\VMware.VMC.NSXT\VMware.VMC.NSXT.psm1:30:48

Line |

  30 |          $sddcId = (Get-VMCSDDC -Name $SDDCName -Org $OrgName).Id

     |                                                 ~~~~

     | A parameter cannot be found that matches parameter name 'Org'.

OperationStopped: C:\Program Files\WindowsPowerShell\Modules\VMware.VMC.NSXT\VMware.VMC.NSXT.psm1:31:9

Line |

  31 |          $sddc = $sddcService.get($orgId,$sddcId)

     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     | The path variable {org} in the url has not been resolved.

This is not an NSX-T based SDDC

I am getting this error because this cmdlet is not part of the following module: VMware.vimAutomation.Vmc. It is however part of this module: VMware.Vmc, which I believe is an old deprived module?

To get this command working should I just install the VMware.Vmc module even though it's no longer supported? Or is there something else I can do?

My main concern is that both modules have the same cmdlet, Get-VMCSDDC which I use in some other scripts, and I am worried about having both modules installed this could lead to other issues. This the error I get when I try to install VMware.VMC

Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9709:34

Line |

9709 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters

     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     | The following commands are already available on this system:'Get-VmcSddc'. This module 'VMware.VMC' may override the existing commands. If you still want to install this module 'VMware.VMC', use -AllowClobber

     | parameter.

Any help would be gratefully received.

Visit My Blog, The SLOG at: http://www.simonlong.co.uk
0 Kudos
4 Replies
LucD
Leadership
Leadership

Afaik, the VMware.VMC module is a community contribution.


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

0 Kudos
SimonLong
VMware Employee
VMware Employee

Is the VMware.VMC.NSXT also a community module? If not, why is using this module to run some of its commands and not VMware.VimAutomation.Vmc?

Visit My Blog, The SLOG at: http://www.simonlong.co.uk
0 Kudos
LucD
Leadership
Leadership

That is also a community module, written by William.

See VMware.VMC.NSXT


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

0 Kudos
SimonLong
VMware Employee
VMware Employee

OK. I think my only option here then is to install the VMware.Vmc Module when I run my script and uninstall it at the end. That way it shouldn't interfere with my other scripts.

Visit My Blog, The SLOG at: http://www.simonlong.co.uk
0 Kudos