Vbscript WMI access GetObject Permission denied

Discussion in 'Server Networking' started by martin, Sep 3, 2004.

  1. martin

    martin Guest

    Hi,

    I have written a vb script to read in a list of machines
    from a file, then connect to each machine and kill a
    specific process using WMI.

    The script worked fine on test machines, however when I
    run on the network, I receive the error: "Permission
    Denied: GetObject 800A0046" on each machine.

    This does not appear to be OS specific. My test machines
    were 2000 Pro, SP4. Live machines included both 2000
    Pro SP4 and XP SP1.

    Presumbly WMI is somehow locked down by one of the more
    recent critical updates, versions of ie or something..?

    The line I am using to connect to the remote machines is:

    Set objWMIService = GetObject("winmgmts:" & "\\" &
    objDictionary.Item(objItem) & "\root\cimv2")

    I am running the script interactively, with domain admin
    rights.

    Any ideas on what may be stopping this running on mylive
    systems?

    Regards,

    Martin
     
    martin, Sep 3, 2004
    #1
    1. Advertisements

  2. Hi Martin,

    Thanks for your posting here.

    You can use the WMI¡¯s WbemLocator object and its method ConnectServer to
    specify different credentials. Here¡¯s the documentation for the same:

    SWbemLocator:

    <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi
    /swbemlocator.asp>

    ConnectServer:

    <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi
    /swbemlocator_connectserver.asp>

    Creating a WMI Script:

    <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi
    /creating_a_wmi_script.asp>

    If you need any further help on this sript, it would be best that you
    contact our Developer newsgroups. I have provided the link below:

    <<http://msdn.microsoft.com/newsgroups/default.asp>>

    You can also ask for developer support:

    http://support.microsoft.com/directory/directory/phonepro.asp?sd=msdn

    Have a nice day!

    Regards,
    Bob Qin
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security

    ====================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ====================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    From: "martin" <>
    Subject: Vbscript WMI access GetObject Permission denied
    Date: Fri, 3 Sep 2004 01:50:16 -0700
    Newsgroups: microsoft.public.windows.server.networking

    Hi,

    I have written a vb script to read in a list of machines
    from a file, then connect to each machine and kill a
    specific process using WMI.

    The script worked fine on test machines, however when I
    run on the network, I receive the error: "Permission
    Denied: GetObject 800A0046" on each machine.

    This does not appear to be OS specific. My test machines
    were 2000 Pro, SP4. Live machines included both 2000
    Pro SP4 and XP SP1.

    Presumbly WMI is somehow locked down by one of the more
    recent critical updates, versions of ie or something..?

    The line I am using to connect to the remote machines is:

    Set objWMIService = GetObject("winmgmts:" & "\\" &
    objDictionary.Item(objItem) & "\root\cimv2")

    I am running the script interactively, with domain admin
    rights.

    Any ideas on what may be stopping this running on mylive
    systems?

    Regards,

    Martin
     
    Bob Qin [MSFT], Sep 6, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.