in reply to Running Perl on Remote Windows Server

welcome to the monastery coding_new and welcome to the 'win32 hell' too...
In last decade i faced the same problem: administrering a win32 environement using Perl: even if i had not won i'm not defeated too..

Here some consideration. There are tools that permit something like remotecommand, i avoid them because they are never safe. Even if billion of known bugs in this decade told us 'risk of remote code execution..' i was never able to use them.

Winzoz force you to use his propietary tools to do such things. Is not that bad as you can imagine. For example i have many Perl programs parsing systems calls: it is not so elegant but tend to be very stable over the years.

So you better use something that natively support remote execution. Some time ago i used 'wmi' to do such thing: wmi seemed to be the revolutionary thing at redmond (as today happen to powershell).

Another viable option is having a Perl client server infrastructure, where the server ask in realtime to client info that you need. it is not so difficult to realize, but not so easy to maintain and upgrade.

Here my old example of quering remote disks usin wmi (probably plagirazed from other monk..):
use Win32::OLE('in'); use constant wbemFlagReturnImmediately => 0x10; use constant wbemFlagForwardOnly => 0x20; sub Logical_Disks { my $computer=shift; my %HoH = (); my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$compu +ter\\root\\CIMV2") or die "WMI connection failed.\n"; my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_ +LogicalDisk", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly)||wa +rn $!; foreach my $objItem (in $colItems) { my @drivetype= ('Unknown', 'No RootDirectory', 'RemovableD +isk', 'LocalDisk', 'Network Drive', 'Compact Disc', 'RAM Disk'); #next if $objItem->{Name}->{'DriveType'} ne 'LocalDisk';#s +kip non logical disks $HoH{ $objItem->{Name} }{ 'DriveType' } =$drivetype[$objIt +em->{DriveType}] ; $HoH{ $objItem->{Name} }{ 'VolumeName' } = $objItem->{Volu +meName}; $HoH{ $objItem->{Name} }{ 'Size' } = $objItem->{Size}; $HoH{ $objItem->{Name} }{ 'FreeSpace' } = $objItem->{FreeS +pace}; } foreach my $key(keys %HoH){delete $HoH{$key} unless $HoH{$key}->{' +DriveType'} eq 'LocalDisk'} return \%HoH; }

HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.