Re: Error 800A0046 while running a vbs script on a remote computer



Nah, the Firewall isn't active.

Just another quick question, if I want to access the eventlog from another
computer, do I need administrator rights? I want to get the Domain
Controllers Security Eventlogs and I'd rather not use "Domain Admins" for
the user that will use the script.

Thanks again!


Mario Lavigne

"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de news: %23qNuHqQSGHA.4952@xxxxxxxxxxxxxxxxxxxxxxx
I would suspect the Windows firewall in XP.

Richard

"Mario Lavigne" <stinkymario@xxxxxxxxxxx> wrote in message
news:u5Px2MQSGHA.4960@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Turned out it was my Windows XP. Most of our computers are running
Windows 2000 and I just ran the script on a Windows 2000 and it works. My
Windows XP is still giving the same error message though.

Thanks!


Mario Lavigne

"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de news: uh7Y2aHSGHA.792@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Your code is fine. In fact it matches exactly listing 12.2 in "Microsoft
Windows 2000 Scripting Guide". I believe your error is raised on the
statement "Set objWMIService = GetObject", which I use all the time to
retrieve info from remote computers. It's as if something in your
network is blocking WMI traffic. Could it be a firewall?

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

"Mario Lavigne" <stinkymario@xxxxxxxxxxx> wrote in message
news:eznEEMHSGHA.1948@xxxxxxxxxxxxxxxxxxxxxxx
Hi Richard,

I am trying to gather the event logs from a DC and I'm in the Domain
Admins group for the purpose of the test. I still have that error event
with full Admin rights.

Any other ideas?

Mario Lavigne

"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> a écrit dans
le message de news: uPnVPBFSGHA.3192@xxxxxxxxxxxxxxxxxxxxxxx
Mario Lavigne wrote:

I am trying to make a script that could read an eventlog from a
remote comptuer. I found some code on MS website :


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile " _
& "Where LogFileName='System'")
For Each objLogFile in colLogFiles
Wscript.Echo objLogFile.NumberOfRecords
Next



When using "." for strComputer, everything works fine. If I put a
remote computer, the 800A0046 error appears (Access Denied
'GetObject'). I also tried the permission
"{impersonationLevel=impersonate, (Security)}" with no success.

Any clues?

Hi,

You need administrative rights on the remote computer. Your user
account, or a group you are a member of (like "Domain Admins") should
be a member of the local Administrators group on the remote machine.
Of course, WMI must be installed and DCOM cannot be disabled (any
computer with Windows 2000 or above should be OK).

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net











.



Relevant Pages

  • Re: Error 800A0046 while running a vbs script on a remote computer
    ... I would suspect the Windows firewall in XP. ... Microsoft MVP Scripting and ADSI ... You need administrative rights on the remote computer. ...
    (microsoft.public.scripting.vbscript)
  • Re: Active Directory GetObject function fails
    ... All Microsoft operating systems from Windows 2000 on support ADSystemInfo. ... Microsoft MVP Scripting and ADSI ... Hilltop Lab - http://www.rlmueller.net ...
    (microsoft.public.scripting.vbscript)
  • Re: Rip audio from USB CD device?
    ... > In Windows 2000, Windows Media Player uses cdral.dll for CD recording, ... >> As far as I know there are three options to get hold of the raw audio ... >> with administrator rights and no other process can use the device, ... Does not work with USB devices. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Help! from jms
    ... This is a good time to remind Windows and Mac users not to do their day-to-day work with administrator rights. ... One should create a regular user account and use it for one's everyday work. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: Simple user/password management?
    ... Pro SP2 computer from a Windows 2000 Pro computer. ... remote computer first and then on your local computer. ... Event Viewer on the Windows 2003 server for any pertinent events that may ... logging of logon events and account management enabled. ...
    (microsoft.public.windows.server.security)

Loading