Consider making -All the default parameterset for Get-Project

Jan 19, 2011 at 8:32 PM

In keeping with principle of least surprise, I would have expected Get-Project to enumerate all projects by default. Consider adding a new parameterset "defaultProject" with a single switch -Default, and then making -All the default parameterset:

# get default project
get-project -default

# get all projects
get-project [-all]

Maybe it's too late now to change this, but this has always bothered me.

Jan 19, 2011 at 9:10 PM
Edited Jan 19, 2011 at 9:10 PM

I remember we had some debate about this as well. The reason we chose it this way (despite not following the PS convention) was that it is consistent with Install-Package and Uninstall-Package cmdlets. Those two commands also act on the default project when you don't specify a project name. Initially, we didn't have the -All parameter for Get-Project. It was added later.