Jump to content

WMI remote execution doesnt work


Recommended Posts

Global $strComputer, $CommandLine

$strComputer="IP";tried with computername too
$CommandLine="notepad.exe"

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
MsgBox(0,"",IsObj($objWMIService)); - this return 0
$objShare = $objWMIService.Get("Win32_Process"); i get the error here  

$objShare = $objWMIService.Get("Win32_Process")
$objShare = $objWMIService^ ERROR

Could anyone tell me why this doesnt work? I have admin rights on the remote computer , it is a domain environment. If i enter my IP it works. WinXP SP2 on both PC's

Link to comment
Share on other sites

the best place to start is using Scriptomatic for Autoit available in the forums.

for the given situation, try to get the remote computer's host name & try using \\remotepcname in the computer name. it might work. not all properties are available with wmi remote calls there is sometimes a few restrictions check Securing a Remote WMI Connection and Connecting to WMI on a Remote Computer

Edited by rajeshontheweb
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...