Consideration for a breaking change?

I’ve been using psadt for many years in my organization, and one of the customizations I did early on was to rename all of the psadt variables from “$env[variableName]” to “$psadt[variableName]”. I, and most of the sysadmins that I’ve trained in psadt, find it very easy to confuse with the native powershell “$env:” naming scheme. So for example, its easy to look at “$env:ComputerName” and not notice that its suppose to be “$envComputerName”. When working on a psadt script, its ideal to use the psadt “$env” variables vs the native powershell “$env:” variables. But when a sysadmin is switching back and forth between developing psadt powershell scripts, and powershell scripts for non-psadt reasons, it can be easy to accidently use the “$env:” variables in the psadt script, and you’d probably never notice because “$env” looks very similar to “$env:”. So to help make things more clear and concise, we eliminated the “$env[variableName]” naming scheme in favor of “$psadt[variableName]”.

Would you ever consider making this change in psadt?

Admittedly this is partially a selfish request because it would make our psadt upgrades easier, as we would not have to perform the required regex find/replace action on all of our scripts. But I do believe it makes a lot of sense and could be beneficial to others.

Thanks for the consideration!

1 Like

You might get your wish.

But you’ll have to wait until version 4.0: