$|++; use strict; use diagnostics; use Win32::Service; use vars qw/$machine %SSvcLst/; $machine = "\\\\". $ARGV[0]; if (Win32::Service::GetServices($machine,\ %SSvcLst)) { print "\nObtaining list of running services\n"; for my $item (sort ( keys ( %SSvcLst ))) { print "$SSvcLst{$item} = $item\n"; if (Win32::Service::GetStatus($machine ,$SSvcLst{$item},\ my %status)) { for my $item2 (keys ( %status)) { print "\t\t$item2 = $status{$item2}\n"; } } } }