view _test/wmi.pl @ 51:a1498298d3ee

Security in progress
author wizard@linux-odin.local
date Mon, 01 Mar 2010 17:25:36 +0300
parents 16ada169ca75
children 0f3e369553bd
line wrap: on
line source

#!/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;