vmware-archive / powernsx

PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions
173 stars 89 forks source link

The term 'Add-NsxApplySPToSG' is not recognized as the name of a cmdlet #549

Closed easyveazie closed 6 years ago

easyveazie commented 6 years ago

I'm using PowerNSX 3.0.1110 and struggling to apply/bind security policies to security groups. I found the function Add-NsxApplySPToSG in v1.6, but do not see an equivalent in 3.x.

easyveazie commented 6 years ago

Should be labeled "Help Wanted"

easyveazie commented 6 years ago

I found it. I was expecting it to be an Add or Set.

New-NsxSecurityPolicyAssignment

nmbradford commented 6 years ago

Add-NsxApplySPToSG was never exported as a PowerNSX function (yes it was included in the module code as part of a large contribution from the community but you would have had to manually export/copy it to utilise it), but we knew its name and function would change, which is why it was never exported. Its function was properly supported in the above exported function.

As always - check the function list and help! Get-Command -module 'powernsx' *policy* is enlightening!

Also - FWIW - The selection of the correct verb in PowerShell can be confusing, but we try to adhere to the approved verb recommendations here (https://docs.microsoft.com/en-us/powershell/developer/cmdlet/approved-verbs-for-windows-powershell-commands).