Another Look at PowerShell Core Version Information

As PowerShell Core begins to spread into our world, and as we start thinking about working and scripting cross-platform, it will be useful to know what type of platform you are running on. The built in $PSVersionTable is an obvious place to start. On PowerShell Core there are also some new built-in variables you can use.

image

But these variables are not on Windows PowerShell. So I decided to add another tool to the mix – a simple function that will provide a snapshot look at version information, including what possible remoting options are available. This should be WinRM for Windows platforms and potentially SSH. The function isn’t especially complicated.

Here’s what it looks like on a variety of platforms.

image

 

image

image

I might package this into my PSScriptTools module.

Have you started embracing this cross-platform world? What challenges have you encountered and how have your overcome them? I’d love to hear your stories.