Get-WmiObject win32_operatingsystem not working properly thru Windows XP Firewall

Posted on 2009-04-21
Medium Priority
Last Modified: 2013-11-16
I'm trying to reboot a host remotely using windows powershell.  I use

Get-WmiObject win32operatingsystem -computername MyHost

and the error I see:

Get-WmiObject : The RPC server is unavailable. (Exception fom HRESULT:0x800706BA)

I've been able to track down the cause: it's the Windows XP firewall on MyHost.  Disabling the firewall makes it work.

So I've been trying to set up the right exception and I'm running into a problem.  At minimum I needed to open port 135 TCP.  But making this work requires another port to be opened, but that port seems to be changing every time I reboot MyHost.  It's in the range of 1090-1160.  I established this fact by looking at the firewall logs.  When I open the second port it starts to work, but after a reboot, that port changes.  I see from netstat and tasklist commands that svchost.exe is listening on that port.

I really want to keep the firewall on.

I realize this is a tough problem.  Has anyone seen this and has a work-around?


- a way to specify an exception for multiple ports in the Firewall
- a way to require svchost.exe to use the same port
Question by:sevzas
  • 2
LVL 17

Expert Comment

by:Jared Luker
ID: 24197298
Is file and print sharing enabled?  I have problems doing anything remotely on my machines at work if that service is disabled.

Author Comment

ID: 24197338
File and Printing is enabled.  The problem is centered around getting the ports opened reliably in the firewall.

Accepted Solution

sevzas earned 0 total points
ID: 24198335
The answer is that there is another place to enable special rules for the firewall.  Microsoft has documented this at


to launch the Group Policy tool, run "gpedit.msc".  Use the directions in the link above to change the "Allow remote administration exception" to "Allow".

Featured Post

Managing Security Policy in a Changing Environment

The enterprise network environment is evolving rapidly as companies extend their physical data centers to embrace cloud computing and software-defined networking. This new reality means that the challenge of managing the security policy is much more dynamic and complex.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Welcome to 2018! Exciting things lie ahead in the world of tech. To start things off, we compiled great member articles on how to stay safe, ways to learn, and much more! Read on to start your new year right.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Screencast - Getting to Know the Pipeline
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question