VMware Cloud Community
halr9000
Commander
Commander
Jump to solution

issues with new-resourcepool cmdlet

Issue #1: The Name parameter should be positional and should have position 0. (General rule of thumb, the name parameter should be this way for ALL new- cmdlets.)

PS > New-ResourcePool bob
New-ResourcePool : A parameter cannot be found that matches parameter name 'bob'.

Issue #2: The Location parameter should perhaps be marked as mandatory. Doing so would prevent this ugly error message:

PS > New-ResourcePool -Name bob
New-ResourcePool : Exception has been thrown by the target of an invocation.

There's a doc bug in the help, but I'll contact the tech writer directly.






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
1 Solution

Accepted Solutions
yboychev
Hot Shot
Hot Shot
Jump to solution

Hi,

10x for informing us about the problems.

Issue#1: Yes there are few New-* cmdlets that are not consistent about the position of the Name parameter and I'll raise this issue

Issue#2: This is a bug. Such error messages should not be visible for the users.

Yavor

View solution in original post

0 Kudos
1 Reply
yboychev
Hot Shot
Hot Shot
Jump to solution

Hi,

10x for informing us about the problems.

Issue#1: Yes there are few New-* cmdlets that are not consistent about the position of the Name parameter and I'll raise this issue

Issue#2: This is a bug. Such error messages should not be visible for the users.

Yavor

0 Kudos