Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Extracting WQL "count" results

by rod (Novice)
on Jul 05, 2006 at 07:34 UTC ( #559261=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Connect to WMI on reporting server
    #
    ...
            FatalCOMError("Can't open WbemScripting object");
    my $SWbemServices = $SWbemLocator->ConnectServer($Server, "root/sms/si
    +te_$SiteCode") or 
            FatalCOMError("Can't connect to server: $Server");
    
  2. or download this
        # Get count of clients in collection
        my $WQL = q/select * from SMS_CM_RES_COLL_CEN01562/;
        $Colln = $SWbemServices->ExecQuery($WQL,"WQL",16) or FatalErr("Exe
    +cQuery for Clients failed",1);
        $count = $Colln->{Count};
    
  3. or download this
        # Get count of clients in collection
        my $WQL = q/select count(*) from SMS_CM_RES_COLL_CEN01562/;
        $Colln = $SWbemServices->ExecQuery($WQL,"WQL",16) or FatalErr("Exe
    +cQuery for Clients failed",1);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://559261]
Approved by Corion
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2023-12-04 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (25 votes). Check out past polls.

    Notices?