rmbolger / Posh-IBWAPI

PowerShell module for interacting with the Infoblox WAPI (REST API).
MIT License
54 stars 8 forks source link

Consider adding default parameter set for Get-IBObject #28

Closed rmbolger closed 6 years ago

rmbolger commented 6 years ago

There are two parameter sets defined in Get-IBObject. ByRef takes an ObjectRef string (optionally via pipeline) and ByType takes an ObjectType string. I find that when I'm quickly perusing a grid by hand, I tend to specify object types most often. What I'd like to do is this:

Get-IBObject grid

But that generates a parameter binding exception because it can't figure out which parameter set to use. So instead, I have to use:

Get-IBObject -ObjectType grid

But if we set the default parameter set to ByType, that problem goes away. And I'm pretty sure passing object references by pipeline still works the way most people would use it. We should test this though.