I have a function
getinfo([string]$subcommand, [string]$argument)
What I would like to do is allow the argument to be of value '-h' or '-help' such that
getinfo hosts -h
would give a help text for the subcommand 'hosts'. Unfortunately, when i specify -h I think it doesn't assign the value of "-h" to $argument and instead creates a new argument.
I was thinking of using a switch parameter but I'm not sure if I can use that in a function in conjunction with $argument above.
Is this possible?