VMware
4 Replies Last post: Sep 29, 2008 3:09 PM by halr9000  

Requesting comments: The -Name parameter as a positional parameter posted: Sep 29, 2008 11:58 AM

Click to view c_shanklin's profile Master 758 posts since
Dec 3, 2007
We are considering changing the -Name parameter to be the first positional parameter for all Get-* and New-* cmdlets.

The idea is that "Get-X Y" will always return the object of type X named Y.
Examples:
1. Get-VM X will return the VM named X (this is the current behavior)
2. Get-VirtualSwitch X will return the Virtual Switch named X (this is not the current behavior).

Some cmdlet behavior will need to change if we do this.

Currently Get-VirtualSwitch X will return all Virtual Switches on host X. Does anyone take advantage of this behavior? Does this behavior make more sense than the proposed change?

We would appreciate any feedback.
Click to view halr9000's profile Master 814 posts since
Jun 7, 2007
We are considering changing the -Name parameter to be the first positional parameter for all Get-* and New-* cmdlets.
Currently Get-VirtualSwitch X will return all Virtual Switches on host X. Does anyone take advantage of this behavior? Does this behavior make more sense than the proposed change?

My comment is "I <3 VMware".

--
Author, Tech Prosaic blog (http://halr9000.com)
Webmaster, Psi (http://psi-im.org)
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast (http://powerscripting.net)
Follow me on Twitter: http://twitter.com/halr9000
Click to view LucD's profile Champion 2,437 posts since
Oct 31, 2005
I'm in favor of the proposed change.
Consistent parameters for all cmdlets!
Click to view halr9000's profile Master 814 posts since
Jun 7, 2007
Yes, "I heart VMware" means I do like the change. :)






Author of the upcoming book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities