Restart-Server Powershell Port

1

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

powershell
rpc
asked on Server Fault Nov 11, 2014 by Ceuse • edited Nov 11, 2014 by squillman

1 Answer

2

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.

Regards

answered on Server Fault Nov 12, 2014 by Fabien Dibot

User contributions licensed under CC BY-SA 3.0