If you make the search and id parameter sets, and make the ID default (since it's an integer), then I could call Get-Secret 42 or Get-Secret "Ultimate Question" and either would work correctly. Additionally, you'd be able to make the SearchTerm ValueFromPipeline without breaking your ability to pipe in secrets...
If you make the search and id parameter sets, and make the ID default (since it's an integer), then I could call
Get-Secret 42
orGet-Secret "Ultimate Question"
and either would work correctly. Additionally, you'd be able to make the SearchTermValueFromPipeline
without breaking your ability to pipe in secrets...