Accessing Remote Computer using WMI in Vbscript

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
f.b.ayub
Posts: 4
Last visit: Wed Sep 26, 2007 3:42 pm

Accessing Remote Computer using WMI in Vbscript

Post by f.b.ayub »

Hi,
I'm trying to access a remote computer and view its running processes thorugh WMI by using a script on my system but i keep getting "RPC server unavailable" error.I have changed the COM settings(as mentioned in msdn library articles) many times but it still gives the same error. The account that I have used to log on to my computer is an administrator on the remote computer also.I'm providing the domain name,remote computer name,userID and password using the
SwbemLocator.ConnectServer()

I'm getting "DCOM was unable to communicate with the computer <Computer_Name> using any of the configured protocols." Error in the Dcomcnfg.exe System EventViewer(local)

Any help will be highly appreciated. f.b.ayub2007-09-26 01:00:22
User avatar
f.b.ayub
Posts: 4
Last visit: Wed Sep 26, 2007 3:42 pm

Accessing Remote Computer using WMI in Vbscript

Post by f.b.ayub »

Hi,
I'm trying to access a remote computer and view its running processes thorugh WMI by using a script on my system but i keep getting "RPC server unavailable" error.I have changed the COM settings(as mentioned in msdn library articles) many times but it still gives the same error. The account that I have used to log on to my computer is an administrator on the remote computer also.I'm providing the domain name,remote computer name,userID and password using the
SwbemLocator.ConnectServer()

I'm getting "DCOM was unable to communicate with the computer <Computer_Name> using any of the configured protocols." Error in the Dcomcnfg.exe System EventViewer(local)

Any help will be highly appreciated. f.b.ayub2007-09-26 01:00:22
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Accessing Remote Computer using WMI in Vbscript

Post by jhicks »

Is there a firewall between you and the server? Is it blocking the RPC ports like 135? You also need 445 open.
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

Accessing Remote Computer using WMI in Vbscript

Post by donj »

RPC Server Unavailable typically means that your script was unable to physically connect to the WMI Service on the remote computer - possibly a firewall, as suggested. It isn't a permissions issue at this point (although that could come up later, also, once you establish connectivity).

The WMI Service does use an endpoint mapper, so you need more than just 135 and 445 open - it's impossible to predict which port the service will eventually use for a given connection.

I would suggest testing your WMI connectivity by running Wbemtest.exe (just run it from Start > Run) on your computer. That'll ensure nothing script-related is causing complications.
This topic is 16 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked