I just ran into a problem with my remoting project in Powershell.

I'm trying to remotely reboot a server sitting in a DMZ from within our intranet but get an RPC server unavailable error.

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

I know that that probably means that the ports needed are blocked.

My question is: what is the minimal amount of ports that I need to open to be able to execute the command sucessfully. And do I need to open the port(s) in both directions or is one enough?

What I found so far from Microsoft is TCP & UDP: HTTP - 80, 443, 593
Named Pipes - 445
RPC Endpoint Mapper - 135

So do I really need to open all the ports? or even more? (Since the dynamic port association?) Sadly I can't freely test since I'm not in charge of the firewalls so I want to order the right ports from the start.

Additional Information:

Source : Server 2012 Reboot-Target : Server2003


You need DCOM ports and WSMan ports open. If you use Powershell v3+, by default DCOM range is 1024-5000, and WSMAN ports are 5985 (http) and 5986 (https).

Hope it'll helps you.


  • 1
    Thanks for the information. The wsman information solved the problem. – Ceuse Nov 13 '14 at 14:13

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.