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?

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)}!\\"

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\"

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

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 \
But i am new to this, any help to solve the problem would be appreciated.

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

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.