Whether it's a scenario like Get-wmiobject that only works in 5.1 and is no longer supported in 7.X or a Module like BurntToast that when installed in 5.1 requires NuGet installed first, but not when installing in 7.X. That's why I think it's nice to have a way for the script to check what version of #PowerShell the terminal is running in.
I drummed up this idea as I was working on a script to install the Module BurntToast. As stated above depending on the PS terminal version, I wanted an #automation way vs trying remembering why it's not installing on PS 5.1 like it normally does in 7.X months down the road.
Hope you can apply this to your workflows and it saves you some time!
Check out my #Github for the PS Term Check here as well as the Install BurntToast Module here.
Comments