1

I want to know if it's possible to start from a Powershell 6/7 Host a Remote session on a host that only has Powershell 5.1 installed (that way I can access some Powershell 5.1 functions that can't be migrated to Powershell 6/7) ?

Regards,

dotdiego
  • 157
  • 3
  • 14

1 Answers1

2

To explicitly target a Windows PowerShell session (versions up to v5.1) on a remote computer, use
-ConfigurationName Microsoft.Powershell with Invoke-Command, for instance.

In fact, as of PowerShell 7.1, this is still the default version that PowerShell remoting commands target, as reflected in preference variable $PSSessionConfigurationName.

See this post for more information.

mklement0
  • 382,024
  • 64
  • 607
  • 775