0

I have a VBS file that is failing on this line:

Set objWMIService = GetObject("WinMgmts:{authenticationLevel=pktPrivacy}
\\myserver\root\MicrosoftIISv2")

with this error:

Microsoft VBScript runtime error: The remote server machine does not
exist or is unavailable: 'GetObject'

where myserver is a Windows 2008 SP2 server. I made sure WMI is running on the server.

What could be wrong?

1 Answer 1

1

Can you prepend the code with On Error Resume Next and append WScript.Echo Err & " : " & Err.Description

Try the code remotely.

Then, try the code locally on the server with myserver substituted with . - i.e.: local machine. Run the code with and without local admin privs...

4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .