# How do I allow (remote) IISReset through the firewall on Win Server 2008

I'm trying to run the following, to reset IIS on a remote machine.

IISReset <remoteMachine>

If I disable the domain firewall, everything works fine. With the firewall enabled, I get

The RPC server is unavailable.

Initially I tried enabling Remote Administration (RPC-EPMAP) and any other rules that looked even tenuously related. Then I tried enabling all the predefined rules, but with no success.

-

135/tcp is only the port-mapper. It is used to negotiate a second connection that runs on a high port (49152-65535/tcp in Server 2008), so you need to allow the port for that connection too. To facilitate firewall traversal, it's possible to lock the port.

-

You might try the following command lines to add inbound rules to the firewall on the web server:

netsh advfirewall firewall add rule name="Remote IIS inetinfo" dir=in action=allow description="Remote IIS Service Managment" program="%systemroot%\System32\inetsrv\inetinfo.exe" enable=yes

netsh advfirewall firewall add rule name="COM+ Remote Administration (All Programs)" dir=in action=allow description="" program="%windir%\system32\dllhost.exe" enable=yes localport=RPC protocol=tcp


I've had to use those to solve WMI/RPC issues when trying to access IIS services. Errors like:

Creating an instance of the COM component with CLSID {2B72133B-3F5B-4602-8952-803546CE3344} from the IClassFactory failed due to the following error: 800706ba.

-