Guarin instances when you know what class you want to work then those child can retrieve class instances
for you.
For example if you wanted to retrieve all instances of re-inserted on the psychological disk class from
the roots to name space you could run either of the following commands got to be an object class inserted
to logical disk or get same instance class in class Rick we inserted two logical disk.
The default configuration settings and windows powers shell cause these two commands to have differently
formatted output both the dash class parameter of get WMI object and dash class name parameter of get
same instance our positional.
That means the following commands.
Virga the same way get WMI object inserted to logical disk.
And so in my instance you inserted two logical disk by default both commands to retrieve all available
instances of the specified class.
You can specify filter criteria to retrieve a smaller set of instances.
The filter language is used by these commands do not use Windows for a shell comparison operators.
Instead traditional programming operators are used as shown in the following table.
Here you can find a comparison between WMI and the same operator and two windows power shell operator.
As for equality inequality greater than as you can see greater than is a character in WMI and in windows
power shell operator is just two letters less than wild cards three in much less than or equal to greater
than or equal to boolean and and boolean.
Or for example to retrieve only instances of re-inserted logical disk where the drive type property
is three rom either of the following commands.
Get an object surrogate w my object class or two to re-inserted two logical disk.
Dust filter.
And in quotes.
Drive type equals to.
Or get some instance there's class name menso to two logical disk does filter end in quotes.
Drive time equals to 3.
Double your mind seem require that strain while your thread in the filter criteria be content within
single quotation marks.
For example name equals bits and single quotation marks.
For this reason the whole filter Well you must be content with the old double quotation marks use and
double quotation marks for the entire filter.
Well your insurance lazarette enclosed single quotation marks are correctly sent to WMI or same day
12 failures are also enclosed within single quotation marks.
Please note many class properties use integers to represent different kinds of things.
For example in re-inserted to underscore logical class the drive type property of three represents a
logical fixed disk.
A find represents an optical disk such as DVD drive.
You'll have to examine the class documentation to learn what each value represents Waren by use and
W Q L both WMI and CYM also accept Querrey statements that are written in the W..
Mike WERA language or WQ L..
This Glarus statements are common in Microsoft Visual Basic script addition scripts for example get
WMI object that squarer it in double quotes.
Select all Thuram W from Rhian.
So to tell logical disk where drive type equals three and the same command for same instance gets same
instance Querrey select from re-inserted to logical disk or drive type equals three.
This command syntax makes it easier to reuse existing guavas statements that you may have or that you
may find in examples written by other people.
A detailed examination of WQ L is beyond the scope of this course and will not cover it further in this
course but you could check it out in the Internet and find the research written by other people and
to examine them.
Now let's take a look at some demonstration examples.
You'll see several ways to Querrey class instances from the repository to use WMI to display all instances
all the re-inserted to service class.
You could run get WMI object Desch class re-inserted to underskirt service.
You seem to display all instances in Windows suited to grossers class Bluestar get same instance Desch
class name when so to turn this coprocessor to use seem to display those instances of the inserter to
a logical class.
Having a drive type of 3 place type get same instance as class name inserted to underscore logical de-risk
does filter and drive type equals three in double quotes to use seamount WQ elk warit to display all
instances although I've inserted two network adapter class you could type get Minton's instance Surak
dash Querrey and double quotes.
Select all as asterisks for all from Vincit to to underscore network adapter.
Close double quotes.