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?

JoelFan
  • 2,165
  • 5
  • 24
  • 30

1 Answers1

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...

Simon Catlin
  • 5,222
  • 3
  • 16
  • 20