Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: WMI SubclassesOf $WMIServices not giving all the objects ?

by BrowserUk (Patriarch)
on Jan 23, 2006 at 12:03 UTC ( [id://524902]=note: print w/replies, xml ) Need Help??


in reply to WMI SubclassesOf $WMIServices not giving all the objects ?

The return from SubclassesOf is a collection. To acess the members of the collection, use the in keyword, which you are importing with your

use Win32::OLE qw (in);
, in conjunction with a for loop.
#! perl -slw use strict; use Win32::OLE qw (in); use Data::Dumper; my $Computer = "."; my $WMIServices = Win32::OLE->GetObject("winmgmts:\\\\" . $Computer . +"\\root\\cimv2"); my $test = $WMIServices->SubclassesOf; for my $sub ( in $test ) { print Dumper $sub; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://524902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-25 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found