Hey folks,
I have a few areas in a dashboard that are returning data that will always have one of a few possible values. I was thinking I could somehow include the value in a translation hashtable name to call its value but I don’t seem to be able to do so with a partially variable name. Get-Variable
doesn’t have the custom T scope in its ValidateSet, Get-PSUVariable
spit out a very long error message* and I couldn’t get Invoke-Expression
to play nice either.
Any suggestions, or should I just write a custom function to handle these explicitly?
*error message:
Status(StatusCode="Unknown", Detail="Exception was thrown by handler.", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1663772104.169000000","description":"Error received from peer ipv6:[::1]:65127","file":"..\..\..\src\core\lib\surface\call.cc","file_line":953,"grpc_message":"Exception was thrown by handler.","grpc_status":2}")
Product: PowerShell Universal
Version: 3.3.1