view _test/wmi.pl @ 415:3d24b10dd0d5 ref20150831

working on IMPL::Config::Container
author cin
date Tue, 20 Oct 2015 07:32:55 +0300
parents 0f3e369553bd
children
line wrap: on
line source

#!/usr/bin/perl -w
use strict;


eval "use Win32::OLE; 1;" if $^ =~ /win/;

my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");

my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting");

print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices;