Every Developer/DevOps was looking for this command at least ones a year (including myself). Truth is that we all like PowerShell and sometimes tend to forget put a running engine pre-conditional check inside a batch script (as whatever script you’re producing, always make sure that it’s transfarable onto another environment) and referencing some function which is not in (default) installed version.
Anyway…take this post as a reminder reference quide.
3 ways of how to quickly find out what version of PowerShell having installed
This is my prefered way over the others. Why? Because it works on local as well as on remote station.
Summing this up
That’s it. Hope you like this short reminder and let me know your preferred way of doing this. Cheers!