view _test/wmi.pl @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
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;