0

I have a server that executes many PowerShell scripts. PowerShell 5.1 is installed. PowerShell 7 is not installed.

If I install PowerShell 7, what PS version will the existing scripts "run on"? 5.1 or 7? If existing scripts will default to use 7, how can I force existing scripts to use 5.1?

zett42
  • 25,437
  • 3
  • 35
  • 72
mortenma71
  • 1,078
  • 2
  • 9
  • 27
  • 1
    Still 5.1. To run scripts using PowerShell 7+, you have to explicitly run them through `pwsh.exe` or associate `pwsh.exe` with `.ps1` file extension to run them when double-clicking in Explorer. – zett42 Feb 16 '23 at 10:26

0 Answers0