PortQuery RPC Failure: "RPC query failed (5)"

Posted on 2006-03-28
Last Modified: 2009-12-16
PortQuery RPC Failure: "RPC query failed (5)". We were attempting to retrieve data from the Windows Event Logs using the Eventquery.vbs script. In the midst of trying to figure out why Eventquery.vbs wouldn't run, I ran "PortQry -n <hostname> -e 135" and received the message "RPC query failed (5)". In order to get the Eventqry.vbs script to run, we disabled Windows FireWall - after which Eventquery.vbs ran.

However, we continue to get the "RPC query failed (5)" message when I try to run PortQry. Does anyone know what this error message means?

We did some further testing and found the following:

(1) if we run PortQry with the firewall ON, we get the "failed" error.

(2) if we run PortQry with the firewall ON, and with Exceptions configured for File & Printer Sharing - as well as adding 135 TCP/UPD ports, we get a return of "Failed". Eventqry.vbs also fails with the error "Please check the system name, credentials, and WBEM Core".

(3) if we run PortQry with the firewall ON, and with Exceptions configured for File & Printer Sharing (only), the program returns "Filtered". Eventqry.vbs returns the same error message: "Please check the system name, credentials, and WBEM Core".

We haven't been able to find any information on the PortQry error. And there's not concise information on the Eventqry/WBEM errors, either.

Any assistance would be appreciated.
Question by:In3T
    1 Comment
    LVL 6

    Accepted Solution

    Port 135 is for the RPC end point mapper database. Are you running this against an AD DC?

    If not, there is nothing to respond on 135 and will result in the RPC error.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
    Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now