This challenge needs PowerShell 7 or newer to connect with Enter-PSSession … -HostName … (SSH-based remoting). Windows ships with Windows PowerShell 5.1, which is too old. Install PowerShell 7 using either option below.
💡 Check what you have first. Open any PowerShell window and run:
$PSVersionTableLook at
PSVersion. If it starts with 5.1, upgrade. If it's 7.x, you're ready — jump back to the walkthrough.
Windows 10/11 include winget. Open Windows PowerShell or Command Prompt and run:
winget install --id Microsoft.PowerShell --source winget
Accept the prompts. When it finishes, PowerShell 7 is installed as pwsh.
PowerShell-7.x.x-win-x64.msi.Installing PowerShell 7 does not overwrite or upgrade Windows PowerShell 5.1. The two live side by side:
powershell (powershell.exe) — the blue icon.pwsh (pwsh.exe) — the new icon.So after installing, if you just reopen your usual "PowerShell," you may still see 5.1. You have to start the new one explicitly.