[Autogenerated] So how do we perform tasks
on the remote computers? Well, first off,
let's look at how we retrieve Sim
information remotely. So first off, I'm
going to set the remote computer name. So,
as before, I'm gonna use my trainer
computer. I'm then going to say, get Sim
instance and then either use Win 32 or
Sim. And realistically, I'm just gonna
pass the computer name as part of the
command that, as we learned previously,
will initiate a temporary session and
retrieve the values that we're looking
for. If I wanted to retrieve the process
of information, it's the same syntax we do
class name when 32 or sim something on
then the computer. The same would be for
memory. On the same would be for operating
system information. So it's identical
depending on which one would like to
utilize. Now it's important to help us and
understand how to identify sim class
methods. So how do we identify the SIM
class methods that we wish to utilize?
Well, the first thing we can do is we can
retrieve the classes by using SIM class.
So I have a variable here called Class I'm
going to use gets in class. And then I
specify what it is. I'm trying to find the
methods for. So the easy example is to use
Win 32 process, or SIM process, which
would list May. The processes that are
available and what I can then do is take
the class variable and there's a property.
They're called sim class methods, which
will display the methods that are
available Now. We can retrieve the SIM
process class in a different way by
utilizing a query instead. So I could say,
Well, instead of going to get me the class
methods, I want to get methods that are
available specifically for a process so
I can say, process equal, Sim instance,
and then use the select SQL type syntax to
retrieve. I'm using note pad at that
point, I can then say Go and get me the
instance of the class name and filter it
instead. If I don't want to use the query
statement, once I have that I can, then
tie the two together. So I can either get
it using query or get it through filter,
and then I already have the list of the
methods. So when we've ran commands in the
past and it says this is the method. This
is how we could retrieve those methods
once we have the classes that we need
we can then use invoke SIM method. This
will allow us to invoke a method off that
class or instance using the name value
pairs in an argument parameter So, for
example, we can specify the computer name,
so if this is specified, it will then
initiate the remote session and execute
that remotely. If I specify the query, it
will then filter the same classes to that.
If I then specify the method name, then
this will execute that method for that
class. So what does that look like? Well,
let's look at how we execute a method. So
first off, I want to retrieve the SIM
process, which in this case will be note
pad. And then I want to call the terminate
method so you can see we're using gets him
instantiate query. So select star from
note pad I can. Then get a list off the
supported methods so you can see here. I'm
saying populate a new variable called Sim
class. Then, as before, if we do process
dot sim class I can, then say select
object and get me the same class name.
Once I have that, then I can retrieve the
same class. Remember, we have. It's kind
of rooting backwards and forwards up and
down the tree. So I retrieved the class
name from the previous commands. And then
you can expand a property called SIM class
methods. SIM class methods will contain
all of the methods available for that
specific process. At that point, I can se
invoke the same method. Tell it what the
process should be, and then simply call
the required method in this case, which is terminate.