I'm having a newtwork issue where port :445 is blocked by my ISP and I need to connect to a network share using the New-PSDrive powershell command.

The command I use is:

New-PSDrive -Name U -PSProvider FileSystem -Root "\\servername.example" -Persist

I forward the port on a remote machine to another (ex. :20445), but can't change the port I connect to locally.

I tried to locally forward the port with WSL's ssh tunneling, but :445 is already in use. All workarounds I found require big changes to the system, probably breaking it.

Can't use a vpn because of other issues.

  • This not a PowerShell code issue, nor a target for PowerShell as a fix. This is pure Windows networking/operations 101 regardless of how you go at this. Your ISP is correct in this block rule, though not all ISP's do. File sharing/SMB/135/139/445 et all ports by their nature should never internet-facing, for that has bee a serious security issue for many years now. Windows expect 135/139/445 for all file share access by design. – postanote Jun 29 '20 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.