470,641 Members | 1,549 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

How to kill a process on remote machine on some other domain?

shrek123
I want to kill some process on remote machine which is on some other domain.
I am using Win32::OLE GetObject to do that. But I am getting following error


Error1: When my remote machine is on same domain as of local machine

Win32::OLE(0.1701) error 0x80070005: "Access is denied" after character 0 in
"WinMgmts:{impersonationLevel=impersonate,(securit y)}!\\10.10.230.40"

Error2: when my remote machine is on other domain.

Win32::OLE(0.1701) error 0x80041021: after character 0 in
"WinMgmts:{impersonationLevel=impersonate,(securit y)}!\\workgroup\10.10.230.40"


Expand|Select|Wrap|Line Numbers
  1. use Win32::OLE qw( in );
  2.  
  3. $Machine = "." unless( $Machine = shift @ARGV );
  4. #$Machine =~ s#^[\\/]+## if( $ARGV[0] =~ m#^[\\/]{2}# );
  5.  
  6. $CLASS = "WinMgmts:{impersonationLevel=impersonate, (security)}!\\$Machine";
  7.  
  8. $WMI = Win32::OLE->GetObject( $CLASS ); #|| die "Unable to connect to \$Machine:" . Win32::OLE->LastError();
  9.  
  10. $ProcList = $WMI->InstancesOf( "Win32_Process" );
  11. print $ProcList;
  12.  

After spending long time to solve the problem, what i think is there is some probelm with the moniker string or with the authentication.

for running the program, I use program.pl \10.10.230.40
But i am new to this, any help to solve the problem would be appreciated.

thanks,
Shrek123
Sep 4 '07 #1
1 4220
Is there any other way to kill and restart processes on remote machine??

Regards,
Shrek123
Sep 5 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Fred | last post: by
7 posts views Thread by Denis Brkljacic | last post: by
4 posts views Thread by Steve B. | last post: by
8 posts views Thread by Mike | last post: by
7 posts views Thread by | last post: by
28 posts views Thread by Jon Davis | last post: by
11 posts views Thread by =?Utf-8?B?U2FsYW1FbGlhcw==?= | last post: by
???
1 post views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.