The WSL Onion
Calling powershell.exe from PowerShell inside WSL
The other day I was playing around in WSL with a colleague of mine and we did this:
# We start out in WSL Debian and enter PowerShell Core marco@box:~$ pwsh PowerShell 7.2.2 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help. # Then we get the major version of the active PowerShell session PS /home/marco> ($PSVersionTable.PSVersion).Major 7 # Then we call powershell.exe and get a completely different version!
[Read More]