Announcement

Collapse
No announcement yet.

local admin logon

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • local admin logon

    I am a little new to scripting so please forgive,

    Problem: I have 1500 computer that are not part of the domain( all machines log on locally) that I need to inventory the software installed. I have a script that will check the registry and print out a report for all software installed listed in the directory that works fine for the computers on the domain but fails if I try to run it on the computers that log on locally. I have set the administrator user name and password on my computer to the same as those 1500 machines( thank God they are all the same) I want to inventory the software on but still run into to premissions problems.

    Needed: basicly what I need is a script to runas local admin or one that lets me connect to the computer and run the script.

    Thanks

  • #2
    Re: local admin logon

    Try this:

    Set fsobj = CreateObject("Scripting.FileSystemObject")
    Set txtfile = fsobj.CreateTextFile("c:\software.txt", True)
    strComputer = "System Name"
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colSoftware = objWMIService.ExecQuery ("Select * from Win32_Product")

    For Each objSoftware in colSoftware
    .
    .
    .
    .
    .
    Next

    Comment


    • #3
      Re: local admin logon

      Thanks but that is not the fix, actually making headway. Found that we have to Enable Distributed COM is there a way to do this in VBS?

      Comment

      Working...
      X