[Autogenerated] So now that we've reviewed
the W my name spaces, how do we execute
commands? Well, first off, there are some
core parameters in the majority off W my
commands. The first one would be the
computer name, and this is a computer name
we can specify as a remote endpoint. So if
you're executing these locally, you don't
need to pass the computer name. It will
just inherently communicate to the local
machine. If we pass a computer name, it
will then try to connect remotely to that
machine. Then, of course, we have the list
option. It's just list on its own. And you
could do this to get information about the
W my classes that are available in the
specified name space. So you'll see. When
we looked at the name spaces on, we use
the application to traverse through it
that actually we could just use list and
it would give us a list of those classes.
And then, of course, we have query. Now
the query is quite an important one. It
allows me to run, for example, select type
queries that you would use in SQL to query
the W. M. I. And this is called W Q L,
which is the language So that w my query
language. And so, for example, it would be
select Star from Maybe Win 32 underscore.
You know something on then, whatever that
filters going to be. So it allows us to
retrieve information at a filtered level.
Now, when we're designing or at least
trying to execute these commands, there's
a kind of a standard structure. So the way
this works, we provide the command. So the
W my command that we wish to execute. Then
we provide the class, which I suppose, go
back to the idea of the folder structure.
We're now going to go into the folder
structure to say, I want to query Windows
32 process of, for example, to give me
processing information, then maybe the
name of the machine, whether it's pastors,
a remote machine or a local machine, and
then any queries that we would like to
pass to him. So if we were to kind of run
this, you could imagine that you would see
something like this where we're going to
say get the W my object. So we're using a
get command to retrieve an object from the
database of information. We're filtering
it down to the process, er so I want to
only query process of for example. Then
I'm connecting to a machine called Trainer
and then I'm passing a query. Of course,
what you can see from here is that doesn't
really make sense as a command structure,
because you wouldn't get the name of the
service from a process. Er so you can see
here where we have class and query. And
actually, when we build the actual
commands, sometimes we don't need to use
all of them either. But as an example,
what we could kind of end up with is
something that looks like this. So get to
be my object class, win 32 process, for
example, trainer, and then go to the
services and get the service called Win
RM. So what that would do is retrieve the
process information about the service, and
then we turn that back so the command
structures fairly straightforward. It will
always be this way. You will do something
with the W. My object. You will then
specify a class or a name space or both a
remote or local machine and then
potentially jQuery now to retrieve
processes. For example, running on a
computer. It's a simple a saying Get to be
my object and then utilize the class
called Win 32 underscore process that is a
predetermined class, which we looked at
that will give me information about
current processes running on machines. If
I was to try and do this on a remote
machine, it's exactly the same. Syntax or
B. We pass the computer name as part of
their command. That's the only difference between a local and a remote computer.