1
00:00:00,240 --> 00:00:01,970
[Autogenerated] So how do we perform tasks

2
00:00:01,970 --> 00:00:05,320
on the remote computers? Well, first off,

3
00:00:05,320 --> 00:00:07,500
let's look at how we retrieve Sim

4
00:00:07,500 --> 00:00:10,190
information remotely. So first off, I'm

5
00:00:10,190 --> 00:00:11,900
going to set the remote computer name. So,

6
00:00:11,900 --> 00:00:13,530
as before, I'm gonna use my trainer

7
00:00:13,530 --> 00:00:16,790
computer. I'm then going to say, get Sim

8
00:00:16,790 --> 00:00:19,660
instance and then either use Win 32 or

9
00:00:19,660 --> 00:00:21,930
Sim. And realistically, I'm just gonna

10
00:00:21,930 --> 00:00:24,930
pass the computer name as part of the

11
00:00:24,930 --> 00:00:27,730
command that, as we learned previously,

12
00:00:27,730 --> 00:00:30,250
will initiate a temporary session and

13
00:00:30,250 --> 00:00:31,540
retrieve the values that we're looking

14
00:00:31,540 --> 00:00:34,840
for. If I wanted to retrieve the process

15
00:00:34,840 --> 00:00:38,510
of information, it's the same syntax we do

16
00:00:38,510 --> 00:00:42,140
class name when 32 or sim something on

17
00:00:42,140 --> 00:00:44,780
then the computer. The same would be for

18
00:00:44,780 --> 00:00:47,460
memory. On the same would be for operating

19
00:00:47,460 --> 00:00:49,930
system information. So it's identical

20
00:00:49,930 --> 00:00:52,200
depending on which one would like to

21
00:00:52,200 --> 00:00:56,580
utilize. Now it's important to help us and

22
00:00:56,580 --> 00:00:59,090
understand how to identify sim class

23
00:00:59,090 --> 00:01:02,600
methods. So how do we identify the SIM

24
00:01:02,600 --> 00:01:05,540
class methods that we wish to utilize?

25
00:01:05,540 --> 00:01:07,340
Well, the first thing we can do is we can

26
00:01:07,340 --> 00:01:11,100
retrieve the classes by using SIM class.

27
00:01:11,100 --> 00:01:13,240
So I have a variable here called Class I'm

28
00:01:13,240 --> 00:01:14,910
going to use gets in class. And then I

29
00:01:14,910 --> 00:01:17,330
specify what it is. I'm trying to find the

30
00:01:17,330 --> 00:01:19,920
methods for. So the easy example is to use

31
00:01:19,920 --> 00:01:22,940
Win 32 process, or SIM process, which

32
00:01:22,940 --> 00:01:26,120
would list May. The processes that are

33
00:01:26,120 --> 00:01:29,150
available and what I can then do is take

34
00:01:29,150 --> 00:01:31,280
the class variable and there's a property.

35
00:01:31,280 --> 00:01:34,030
They're called sim class methods, which

36
00:01:34,030 --> 00:01:36,160
will display the methods that are

37
00:01:36,160 --> 00:01:39,630
available Now. We can retrieve the SIM

38
00:01:39,630 --> 00:01:42,760
process class in a different way by

39
00:01:42,760 --> 00:01:46,080
utilizing a query instead. So I could say,

40
00:01:46,080 --> 00:01:47,960
Well, instead of going to get me the class

41
00:01:47,960 --> 00:01:50,620
methods, I want to get methods that are

42
00:01:50,620 --> 00:01:53,870
available specifically for a process so

43
00:01:53,870 --> 00:01:56,470
I can say, process equal, Sim instance,

44
00:01:56,470 --> 00:01:59,590
and then use the select SQL type syntax to

45
00:01:59,590 --> 00:02:02,780
retrieve. I'm using note pad at that

46
00:02:02,780 --> 00:02:05,880
point, I can then say Go and get me the

47
00:02:05,880 --> 00:02:08,480
instance of the class name and filter it

48
00:02:08,480 --> 00:02:11,110
instead. If I don't want to use the query

49
00:02:11,110 --> 00:02:14,170
statement, once I have that I can, then

50
00:02:14,170 --> 00:02:16,400
tie the two together. So I can either get

51
00:02:16,400 --> 00:02:19,340
it using query or get it through filter,

52
00:02:19,340 --> 00:02:20,750
and then I already have the list of the

53
00:02:20,750 --> 00:02:23,290
methods. So when we've ran commands in the

54
00:02:23,290 --> 00:02:25,880
past and it says this is the method. This

55
00:02:25,880 --> 00:02:28,540
is how we could retrieve those methods

56
00:02:28,540 --> 00:02:31,330
once we have the classes that we need

57
00:02:31,330 --> 00:02:34,540
we can then use invoke SIM method. This

58
00:02:34,540 --> 00:02:36,630
will allow us to invoke a method off that

59
00:02:36,630 --> 00:02:39,410
class or instance using the name value

60
00:02:39,410 --> 00:02:43,400
pairs in an argument parameter So, for

61
00:02:43,400 --> 00:02:45,510
example, we can specify the computer name,

62
00:02:45,510 --> 00:02:47,790
so if this is specified, it will then

63
00:02:47,790 --> 00:02:50,020
initiate the remote session and execute

64
00:02:50,020 --> 00:02:53,510
that remotely. If I specify the query, it

65
00:02:53,510 --> 00:02:56,330
will then filter the same classes to that.

66
00:02:56,330 --> 00:02:58,910
If I then specify the method name, then

67
00:02:58,910 --> 00:03:01,410
this will execute that method for that

68
00:03:01,410 --> 00:03:04,370
class. So what does that look like? Well,

69
00:03:04,370 --> 00:03:06,760
let's look at how we execute a method. So

70
00:03:06,760 --> 00:03:09,090
first off, I want to retrieve the SIM

71
00:03:09,090 --> 00:03:11,200
process, which in this case will be note

72
00:03:11,200 --> 00:03:14,120
pad. And then I want to call the terminate

73
00:03:14,120 --> 00:03:16,600
method so you can see we're using gets him

74
00:03:16,600 --> 00:03:19,270
instantiate query. So select star from

75
00:03:19,270 --> 00:03:22,690
note pad I can. Then get a list off the

76
00:03:22,690 --> 00:03:25,380
supported methods so you can see here. I'm

77
00:03:25,380 --> 00:03:27,800
saying populate a new variable called Sim

78
00:03:27,800 --> 00:03:31,880
class. Then, as before, if we do process

79
00:03:31,880 --> 00:03:34,450
dot sim class I can, then say select

80
00:03:34,450 --> 00:03:36,860
object and get me the same class name.

81
00:03:36,860 --> 00:03:39,760
Once I have that, then I can retrieve the

82
00:03:39,760 --> 00:03:41,560
same class. Remember, we have. It's kind

83
00:03:41,560 --> 00:03:43,190
of rooting backwards and forwards up and

84
00:03:43,190 --> 00:03:45,560
down the tree. So I retrieved the class

85
00:03:45,560 --> 00:03:48,770
name from the previous commands. And then

86
00:03:48,770 --> 00:03:52,460
you can expand a property called SIM class

87
00:03:52,460 --> 00:03:56,070
methods. SIM class methods will contain

88
00:03:56,070 --> 00:03:58,470
all of the methods available for that

89
00:03:58,470 --> 00:04:01,670
specific process. At that point, I can se

90
00:04:01,670 --> 00:04:04,080
invoke the same method. Tell it what the

91
00:04:04,080 --> 00:04:06,850
process should be, and then simply call

92
00:04:06,850 --> 00:04:10,000
the required method in this case, which is terminate.

