The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Win32::WMIC - Access to the MS Windows Management Instrumentation Utility!

VERSION

Version 0.01

SYNOPSIS

WMIC extends WMI for operation from several command-line interfaces and through batch scripts. Understand?

Essentially, MS Windows captures a crap-load of information about the system, users, hadware, etc and now makes it available via the wmic command-line utility.

See this URL for more details: [last checked Mon Dec 28 21:42:44 2009 ] http://technet.microsoft.com/en-us/library/bb742610.aspx

Use it in Perl...

    use Win32::WMIC;

    my $wmic = Win32::WMIC->new();
    my $csv  = $wmic->query('process list')->data; # get processes
    my $data = $wmic->parse;

METHODS

new

the `new` method is used to instantiate a new Win32-WMIC object

new arguments

no arguments

new usage and syntax

    my $wmic = Win32::WMIC->new;
    
    takes 0 arguments
    
    example:
    my $wmic = Win32::WMIC->new;

query

the `query` method is used to issue commands against the wmic utility

query arguments

$query

query usage and syntax

    $wmic->query($query);
    
    takes 1 argument
        1st argument  - required
            $query    - a single valid wmic command string
    
    example:
    my $query = 'useraccount list breif';
    $wmic->query($query);

data

the `data` method is used to output the raw unprocessed resultset returned from the wmic query

data arguments

no arguments

data usage and syntax

    $wmic->data;
    
    takes 0 arguments
            
    example:
    my $raw_resultset = $wmic->data;

parse

the `parse` method is used to produce a perl object from the wmic query resultset

parse arguments

\%where, \@order

parse usage and syntax

    my $data = $wmic->parse;
    
    takes 2 arguments
        1st argument  - optional
            $where    - a SQL::Abstract hashref where-clause construct
        2nd argument  - optional
            $order    - a SQL::Abstract arrayref order-clause construct
    
    example:
    my $data = $wmic->parse;

AUTHOR

Al Newkirk, <awncorp at cpan.org>

BUGS

Please report any bugs or feature requests to bug-win32-wmic at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Win32-WMIC. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Win32::WMIC

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Al Newkirk, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.