Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Extracting WQL "count" results

by rod (Novice)
on Jul 05, 2006 at 07:34 UTC ( [id://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 browsing the Monastery: (2)
As of 2024-06-23 22:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.