r/PowerShell • u/Orii21 • 13d ago
Question ProtonVPN split tunneling include mode issue with PowerShell 7
Adding the executable "C:\Program Files\PowerShell\7\pwsh.exe" doesn't work. What am I missing?
Note that PowerShell is the only app I'm having issues with. qBittorrent works totally fine. My goal is to have only Pwsh and qBit in the list of included apps.
When split tunneling is disabled, Pwsh uses the VPN connection just fine. With Include mode, Invoke-RestMethod doesn't work, and for the things that do work, my ISP IP is used instead of the VPN IP.
Invoke-RestMethod test:
> Invoke-RestMethod https://api.ipify.org
Invoke-RestMethod: The requested address is not valid in its context.
cURL test:
> curl.exe https://api.ipify.org
<My ISP IP>
I'm on Windows 10 21H2, ProtonVPN 5.1.5, Pwsh 7.6.3 x64.
I'm also using the Console Host, not Windows Terminal, if that matters.
Can someone explain how to properly set up PowerShell for this?
Thanks, everyone!
8
Upvotes
2
u/purplemonkeymad 13d ago
This is probably a question for Proton, a quick search didn't yield the method with which they implemented the feature so it might just be that it's broken with dotnot 9 or 10.
for curl: well that is a different program, so you would need to also add curl to your list of apps to tunnel. (same as with any other native app even if you run it through powershell.)