Re: active directory search

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Gary" <Gary@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1D645DD7-2A22-4C1F-ABF6-3356C7650F0E@xxxxxxxxxxxxxxxx
> Error:
> An exception of type 'Microsoft VBScript runtime error: Permission denied:
> 'GetObject" was not handled.

I could be wrong, but it look like the account you are running the script
under does not have permissions to connect to WMI on this server. Put a
'WScript.Echo strComputer' like just before the 'GetObject' line. This way
we will know exactly which server it is failing on and you can check the
permissions. Just for testing purposes, once you know the server, just
create a small script that contains nothing more that something like this:

strComputer = [the name of the last computer echoed in the script]
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationlevel=impersonate}!\\" & strComputer & "\root\cimv2")

Run this script and see if you get a permissions denied error.


.



Relevant Pages

  • Re: server checking script to save time
    ... I also have a flaky Microsoft Server 2003 cluster which i would LOVE ... leaving work on time if this script saves me time, ... for each strComputer in arrServers ... For Each objDisk in colDisks ...
    (microsoft.public.scripting.wsh)
  • Re: Microsoft SWORE TO MARY this Drive space script would work but Mary must have been busy.
    ... StrComputer = RS.Value ... ''' First try to ping the server. ... ''' If getting the list of drives fails, log it to the errors table. ... Microsoft guarantees this script to work but all I can say is "Algun ...
    (microsoft.public.scripting.vbscript)
  • Re: GetObject Error Checking
    ... version is of the server. ... machine does not exist or is unavailable 'GetObject'. ... strComputer = objCommandLineArguments.item ... On Error Resume Next ' Turns auto error trapping OFF ...
    (microsoft.public.windows.server.scripting)
  • Re: VBS Shutdown script loop not working
    ... I want a script to ... First I wrote a batch file using the shutdown command. ... server was shutdown before it returned to the script to get the next ... strComputer = Trim ...
    (microsoft.public.scripting.vbscript)
  • Advice on using Win32_Printer
    ... which is to enumarate the printers attached to each Server. ... If I know that this script would work, then I can add what I need it to do ... Set colItems = objWMIService.ExecQuery("Select * from ... ' WScript.Echo strComputer ...
    (microsoft.public.windowsxp.wmi)