annotate _test/wmi.pl @ 49:16ada169ca75

migrating to the Eclipse IDE
author wizard@linux-odin.local
date Fri, 26 Feb 2010 10:49:21 +0300
parents da5bc24b3d3c
children 0f3e369553bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
1 #!/usr/bin/perl -w
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
3
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
4 use Win32::OLE;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
5
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
6 my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
7
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
8 my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting");
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
9
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
10 print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
11
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 22
diff changeset
12