my $ole = Win32::OLE->new('WbemScripting.SWbemLocator') or die "Can't start OLE"; # do some stuff to get a big list of ip addresses, hostnames, username, and passwords foreach .... { # next if the ip does not ping... my $wmi = $ole->ConnectServer($ip, 'root/cimv2', $hostname.'\\'.$user, $pw, undef, undef, 128); # do some WQL stuff }