This project is read-only.

Name the parametersets

Aug 8, 2011 at 9:00 PM

Just quick feedback, only just now imported the module for the first time. :)

Could you please give useful names to the parametersets on the functions? For example, I'm looking at Get-Dns and they are named:

  • Universal
  • PS1
  • PS2
  • PS3
  • PS4

I am a proponent to having multiple parametersets, but they are hard enough to learn, much less teach given that MS doesn't really expose them very well in the built-in help system. If you give them at least a somewhat meaningful name, then if someone were to display them programmatically (like I do all the time), they can at a glance tell what a cmdlet is capable of.

While at it, I see that none of the params on Get-Dns are marked as mandatory or pipelineable. Perhaps another missed opportunity to make the cmdlets as easy to use as possible? Think about it.

BTW, here's the output from my Get-Parameter script:

PS> gpm get-dns


   ParameterSet: Universal

Name       Type       IsMandatory Pipeline
----       ----       ----------- --------
Name       String           False    False
RecordType RecordType       False    False
Server     String           False    False
Port       UInt16           False    False
TimeOut    Byte             False    False
Tcp        Boolean          False    False


   ParameterSet: PS1

Name               Type        IsMandatory Pipeline
----               ----        ----------- --------
Name               String            False    False
RecordType         RecordType        False    False
Server             String            False    False
Port               UInt16            False    False
TimeOut            Byte              False    False
Tcp                Boolean           False    False
RecordClass        RecordClass       False    False
NoRecursion        Boolean           False    False
SearchList         String[]          False    False
AppendToMultiLabel Boolean           False    False
EDnsSize           UInt16            False    False
RequestNSID        Boolean           False    False


   ParameterSet: PS2

Name       Type       IsMandatory Pipeline
----       ----       ----------- --------
Name       String           False    False
RecordType RecordType       False    False
Server     String           False    False
Port       UInt16           False    False
TimeOut    Byte             False    False
Tcp        Boolean          False    False
Iterative  Boolean          False    False


   ParameterSet: PS3

Name       Type       IsMandatory Pipeline
----       ----       ----------- --------
Name       String           False    False
RecordType RecordType       False    False
Server     String           False    False
Port       UInt16           False    False
TimeOut    Byte             False    False
Tcp        Boolean          False    False
NSSearch   Boolean          False    False


   ParameterSet: PS4

Name         Type       IsMandatory Pipeline
----         ----       ----------- --------
Name         String           False    False
RecordType   RecordType       False    False
Server       String           False    False
Port         UInt16           False    False
TimeOut      Byte             False    False
Tcp          Boolean          False    False
ZoneTransfer Boolean          False    False
Incremental  UInt32           False    False

Aug 8, 2011 at 11:23 PM

Yep I can do that. That said, there may be a bit of a delay, extremely busy recently which has made updates hard.

Chris

Aug 12, 2011 at 9:16 AM

This will be fixed in the next release. That is, it's done, but I want to finish off a couple more things before I post another version.

Chris