Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I wish to send a "net send" type of command from Unix to Windows 2000. The purpose is to display a message box on the Windows client. The parameters being the IP address to send to and the message itself. Windows has a similar command which works as follows:"net send 10.180.4.369 a message" or "net send gbrpc4787 a message".I am not sure how or if this can be done using perl ?

Replies are listed 'Best First'.
Re: "net send" in unix
by Fletch (Bishop) on Feb 03, 2004 at 17:06 UTC

    search.cpan.org is your friend. Looking for winpopup brings up some posibilities (Filesys::SmbClientParser). Of course you always could just drive smbclient directly.

      Just to supplement, here's a sample usage...

      echo "foo on you, Windows" | smbclient -M <hostname>

      ,welchavw

Re: "net send" in unix
by Plankton (Vicar) on Feb 03, 2004 at 17:07 UTC
    You could use ssh. There are a few options here: you could look into using the Perl module Net::SSH, or just install an OpenSSH server on your windows box ( I use the OpenSSH that comes with cygwin ) and execute something like this ...
    Unix box% ssh windows_box net send 10.120.4.369 a message

    Plankton: 1% Evil, 99% Hot Gas.