Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (29 sloc) 1.08 KB
layout title excerpt permalink tags categories published comments author_profile header
single
Creating a PowerShell Remoting session in PowerShell v2
The following method allows you to create a PowerShell remoting session in v2 even if the remote host is running v3+
powershell
powershell-remoting
powershell
true
true
false
image caption teaserlogo
images/headers/Code01_1920x500.jpg
images/2017/2017-03-29-RegisterPowerShellv2session/coding.png

I recently wanted to test copying file over a PSSession where the remote host would be PowerShell v2 with PowerShell Remoting enabled.

I did not have any handy machine with only PS2 installed so I had to register a new PowerShell Configuration to use that context.

# Create a new PowerShell Session Configuration named 'PS2'
Register-PSSessionConfiguration -Name PS2 -PSVersion 2

To access to this PSSession Configuration remotly, you would do the following

# Access the PSSession configuration created above remotely
Enter-PSSession -Computer RemoteServer -Configuration PS2