Summary: Pulling up the properties of $PSVersionTable to identify your PowerShell edition
Hey, Doctor Scripto! I want to write my modules and scripts to be more portable. How can I tell if I am executing on PowerShell Core?
Just use the $PSVersionTable object and examine the PSEdition value. If it returns ‘Core’ you are running on PowerShell core.
PowerShell, Doctor Scripto, PowerTip, Sean Kearney
The post PowerTip: Identify if you are running on PowerShell Core appeared first on Scripting Blog.