annotate _test/wmi.pl @ 26:c529d386d80e

Text services in progress
author Sergey
date Thu, 15 Oct 2009 17:52:09 +0400
parents da5bc24b3d3c
children 16ada169ca75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
1 #!/usr/bin/perl -w
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
2 use strict;
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
3
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
4 use Win32::OLE;
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
5
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
6 my $wmi = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2");
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
7
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
8 my $colServices = $wmi->ExecQuery("select * from Win32_NetworkAdapterSetting");
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
9
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
10 print $_->Element,"\t",$_->Setting,"\n" foreach in $colServices;
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
11
da5bc24b3d3c wmi tests
Sergey
parents:
diff changeset
12