0 vote
Several PowerShell module commands, like Get-RDMUser, Get-RDMDataSource (and probably others) have parameter -Name that takes input. As i found out, that parameter requires provided name to be exactly same case as the name in data source.
At the same time, commands like Get-RDMSession parameter -Name is not case sensitive.
PowerShell is generally not case-sensitive. It would be nice, if all commands would follow the same rule (and be documented, if they have different approach).
It also would be nice, if parameter -Name (and other parameters) could support wildcard characters. Searching for resources from command line would be much easier with that.
Hi,
Good point on the case sensitiveness of Get-RDMUser, Get-RDMDataSource and possibly other. I'll make sure all our commands are case-insensitive.
As for the support for wildcard characters, I'll add this on our TODO list and see what we can do.
Regards
Jonathan Lafontaine
Hi, me again.
I've modified the commands where -Name can be used to be case insensitive unless -CaseSensitive is also used.
That modification will be available on version release after 2021.2.0 RC3 on PSGallery. The module name is RemoteDesktopManager. Any RDM must be version 2021.2 at least (those available are on beta only at the time this is written).
In the meanwhile, you can workaround you issue in several ways.
If you are using PowerShell in interactive mode, the -Name property has autocomplete.
Pressing tab will cycle through the available values. You can write only a part of the value and the auto complete will limit the values cycled through to those matching.
You can also using the 'where' command to achieve the same goal.
Ex. Get-RDMDataSource | where {$_.Name -like 'local data*'} will find a data source named 'Local Data Source'
There is also the case sensitive variant called -clike.
This method (you can use other operator like match, eq, etc) covers a wide range of cases so we won't be implementing wildcard characters ourselves.
Let me know if you have any question or suggestion.
Regards
Jonathan Lafontaine
We should be able to use PS best practices - filter left. The more we have to pull down the pipeline, the slower things are. Obviously, with something like a datasource, the number should be extremely low and not noticeable,but ideally, for best practice, we shouldn't be dependent on that.
I'd really rather do something like this:
Get-RDMDataSource -name local* Get-RDMSession -name server* Get-RDMSession -Type RDP # (or -kind.. but type always makes way more sense to me
Thanks :-)
David F