Get-EnvironmentalVariable #23
jdhitsolutions
started this conversation in
General
Replies: 2 comments
|
Great insights. I'm slowly starting to wrap my head around all of places that you've pointed out these principles and over time it is having / will have an increasing impact on how I approach every new ( or refactored) function. Writing these gev and sev functions already provided some new things learned and this layers nicely on that. |
0 replies
|
I just wrapped up the object output and will be testing ASAP. Still have a bit to do for partial name matches and other basic logic, but I'm happy with the basic output now. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I like the idea of a command that makes it easier to view environmental data. However, I think you can improve this by defaulting to the
Processscope. A user is likely to use the command like this after seeing the full output.I expected to see
Jeff. Then I remembered environment scope.Your default output shows the Process
Usernameso I would expect that to be the value when I get a single environment variable.And again, instead of writing a hashtable as the output, write an object. That would allow the user to run
Get-EnvironmentVariable | Sort-Object. It would also be helpful to be able to use wildcards:Get-EnvironmentVariable w*.Since I know what the output object is, I can do it:
But the whole point of the command is to reduce friction for the user.
Finally, if you are going to write a custom object to the pipeline, I would try to show what target scopes apply to each environment variable.
All reactions