Jamie
Jamie

Reputation: 483

How to Set Default Powershell version in Windows Server Core

In Windows Server Core, after installing version 7 from the msi (7.2.0), there is an expectation that in the documents folder, there should be two folders, one for WindowsPowerShell (version 5) and one for PowerShell (version 7).

While 7.2.0 is installed, the Windows Server Core is starting up with version 5. Looking for a one liner to change that default startup from 5 to 7.

There is no "Settings" link in Windows Server Core. It is command line only.

Is there a command line that will enable this switch from five to seven?

The pwsh.exe is available under C:\Program Files\Powershell\7 as pwsh.exe and launching it produces the expected result. But on startup, this version does not launch.

Upvotes: 3

Views: 4550

Answers (1)

Jamie
Jamie

Reputation: 483

Checking the Path reveals the PowerShell 7 path is stated. Typing pwsh anywhere at a command line will automatically run version 7 once that path is in place and it appears to be a default for PowerShell 7

Upvotes: 1

Related Questions