annotate _test/wmi.pl @ 37:c2e7f7c96bcd
 
performance improvements, DOM reworked (a little)
 | author | Sergey | 
 | date | Mon, 23 Nov 2009 00:59:06 +0300 | 
 | parents | da5bc24b3d3c | 
 | children | 16ada169ca75 | 
 | rev | line source | 
  
| 22 | 1 #!/usr/bin/perl -w | 
|  | 2 use strict; | 
|  | 3 | 
|  | 4 use Win32::OLE; | 
|  | 5 | 
|  | 6 my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2"); | 
|  | 7 | 
|  | 8 my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting"); | 
|  | 9 | 
|  | 10 print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices; | 
|  | 11 | 
|  | 12 |