[Autogenerated] now, one of the reasons
for using W. M. I is that it gives us a
powerful platform for managing computers.
We're able to manage not just local
machines but also remote machines. Albeit
there needs to be some configuration doing
on those remote machines to allow the
communication from my machine to that
other machine. Now the prerequsites for
this are focused on four core things. The
first one is Windows firewall settings. So
we need to enable to be my traffic
directly through the windows firewall off
the devices so that communication could
take place. Which means that when I
execute the command, it will be received
on the other end and returned the results.
We may also need to configure the user
account control settings. The easiest way
of doing this without making the changes
is to ensure that we run PowerShell window
or the PowerShell console or the I S. C or
whatever PowerShell application that we
use him, that we run that in the context
off administrator. Then, of course, we may
need to explicitly grant decomp access,
activation and launch rights to the
account that's going to be used for
connecting to the other machine and We may
also need to do some of the same object
model settings. There's a registry key
court allow anonymous call back. So if I'm
trying to connect to a machine and the two
machines are not on the same domain or
their untrusted, we may need to set that
registry key. Now, of course, there are
ways of doing this within Windows we can
actually executable PowerShell command
called Enable ps ra Moting, and it will do
some of the configuration for us now. Of
course, a key thing is retrieving a list
of classes and name spaces to retrieve all
the W my classes within the default name
space, which is route, we would simply say
get doing my object and then use that list
parameter to just render that out as a big
list in the screen. If we wanted to target
it to specific types, then we could say
to be my object list, and then we're going
to utilize standard PowerShell syntax are
where object on. Then we're going to
filter that out by wind. 30. To win 32 is
a standard one for looking for Windows.
Items such as memory process, a hard disk,
etcetera then, of course, we can retrieve
all of the W my name spaces by utilizing
to be my object again Name space is route,
so we specify that were in the root name
space. And then we set the class to
underscore underscore name space, which
will be the default one which looks very
similar to the second one. But this time
I'm using Query. So it's showing you that
we can achieve the same thing by utilizing
either name space and class parameters or
we can use query and then name space. So
two different ways of doing the same
thing. But either way, this will retrieve
a list of the classes and name spaces.
Now, we can also go a little bit further
here where we can use to be my object name
space, and you'll notice we now can do a
combination off what would have been the
name space on then? The class. So one of
the class names, for example, is called
security center too, so we can combine the
two together instead of utilizing the
class parameter. And now we're able to use
list. So we can say retrieval the W M O
classes for a specific name space we can
also then target even further. So, for
example, you notice the parameter last
time was called class name, so that would
be security center to. In this instance,
we're going to retrieve anti virus product
information. How do I know that anti virus
product information is there? Well, when
we use the W my explorer we can actually
do in and see that when we expand onto
route and go to security center to that
will be click into there, you'll see anti
virus as a class, so we can, then drill
down even further to retrieve the specifics for that class and name space.