-
-
Notifications
You must be signed in to change notification settings - Fork 854
Description
Summarize Functionality
It would be convenient to write the below:
Get-DbaRegServer CMS -Name '*serv*', '*ws1'
instead of
Get-DbaRegServer CMS | Where-Object { $_.Name -like '*serv*' -or $_.Name -like '*ws1' }
Is there a command that is similiar or close to what you are looking for?
No
Technical Details
I've explored the web and found the [SupportsWildCards()] attribute which should alert the user to the new support in the help.
It didn't seem straightforward on how to implement. The current implementation uses -in and I guess to support an array of wildcards one would have to rewrite as a foreach or the like.
I also read through the Supporting Wildcard Expansion article which provided insight into System.Management.Automation.Wildcardpattern and System.Management.Automation.Wildcardoptions libraries. I assume these would provide native support for the descriptions in the Supporting Wildcard Characters in Cmdlet Parameters article. I'm not exactly sure how these would be implemented in the current build of the function.