Mercurial > pub > Impl
diff _test/wmi.pl @ 22:da5bc24b3d3c
wmi tests
author | Sergey |
---|---|
date | Wed, 30 Sep 2009 17:41:32 +0400 |
parents | |
children | 16ada169ca75 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/_test/wmi.pl Wed Sep 30 17:41:32 2009 +0400 @@ -0,0 +1,12 @@ +#!/usr/bin/perl -w +use strict; + +use Win32::OLE; + +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; + +