1
00:00:00,640 --> 00:00:03,640
[Autogenerated] So let's compare the two

2
00:00:03,640 --> 00:00:07,270
so W m I. If we talk about that first is

3
00:00:07,270 --> 00:00:10,250
deprecate ID. They are not being changed.

4
00:00:10,250 --> 00:00:12,580
Doesn't mean it disappeared, but in

5
00:00:12,580 --> 00:00:14,930
Windows PowerShell itself an older

6
00:00:14,930 --> 00:00:17,140
versions of PowerShell It still exists,

7
00:00:17,140 --> 00:00:19,870
however, the W My commands are not

8
00:00:19,870 --> 00:00:23,040
included with PowerShell core, which is

9
00:00:23,040 --> 00:00:26,090
what PowerShell seven is built on. It uses

10
00:00:26,090 --> 00:00:29,380
do calm for the communication. An example

11
00:00:29,380 --> 00:00:32,510
of this would be get w my object. You

12
00:00:32,510 --> 00:00:34,520
would then specify the object or the

13
00:00:34,520 --> 00:00:36,850
property that you wish to retrieve, and

14
00:00:36,850 --> 00:00:39,160
then you would get the values back now.

15
00:00:39,160 --> 00:00:41,230
Sim, on the other hand, are the new

16
00:00:41,230 --> 00:00:44,780
commands. It is included within PowerShell

17
00:00:44,780 --> 00:00:48,340
Core and is available in PowerShell seven.

18
00:00:48,340 --> 00:00:50,930
It uses a different communication protocol

19
00:00:50,930 --> 00:00:52,720
instead of using do com, which has been

20
00:00:52,720 --> 00:00:55,250
around for a long time. It uses what's

21
00:00:55,250 --> 00:00:57,240
called do Bs Man protocol for the

22
00:00:57,240 --> 00:01:01,430
communication, the comparison command.

23
00:01:01,430 --> 00:01:05,620
Forget W My object is get sim instantiate.

24
00:01:05,620 --> 00:01:07,550
The naming conventions have changed, but

25
00:01:07,550 --> 00:01:09,380
the same instance and the W. My object

26
00:01:09,380 --> 00:01:11,150
will allow us to effectively query the

27
00:01:11,150 --> 00:01:15,120
same data and return the values. So let's

28
00:01:15,120 --> 00:01:17,640
do a comparison between some commands so

29
00:01:17,640 --> 00:01:19,880
first one. If I want to retrieve the

30
00:01:19,880 --> 00:01:23,440
operating system details using W my I can

31
00:01:23,440 --> 00:01:27,080
call, get w my object and then simply pass

32
00:01:27,080 --> 00:01:30,510
in the class So the properties dash class

33
00:01:30,510 --> 00:01:32,540
and then, as we've learned in the past,

34
00:01:32,540 --> 00:01:35,290
it's prefixed us. Win 32 underscore, and

35
00:01:35,290 --> 00:01:37,500
then whatever that would be So operating

36
00:01:37,500 --> 00:01:40,010
system Now to do the same thing. Using

37
00:01:40,010 --> 00:01:43,280
Sim, I'm going to use get Dash Sim

38
00:01:43,280 --> 00:01:46,110
instance, still have the same property,

39
00:01:46,110 --> 00:01:48,610
but this time it's called Class name. And

40
00:01:48,610 --> 00:01:52,250
then I pass in the same object. So W my

41
00:01:52,250 --> 00:01:55,640
object and Sim instantiate or W M. I and

42
00:01:55,640 --> 00:01:58,650
Sim cmdlet SSHD are effectively the same.

43
00:01:58,650 --> 00:02:00,910
Except you will find differences as you

44
00:02:00,910 --> 00:02:04,130
execute the SIM commands, such as extra

45
00:02:04,130 --> 00:02:06,440
properties, different options available to

46
00:02:06,440 --> 00:02:10,420
us. So how do you find the same classes

47
00:02:10,420 --> 00:02:12,790
and instances that you wish to utilize?

48
00:02:12,790 --> 00:02:14,610
Well, first, off, we can use what's called

49
00:02:14,610 --> 00:02:17,660
get Dash Sim class. This will list you all

50
00:02:17,660 --> 00:02:20,650
of the SIM classes that are available. So

51
00:02:20,650 --> 00:02:23,360
in the last example, we called Win 32

52
00:02:23,360 --> 00:02:25,250
Underscore operating system, which would

53
00:02:25,250 --> 00:02:28,390
be one of those classes. If I want to

54
00:02:28,390 --> 00:02:30,620
list, for example, anything that's related

55
00:02:30,620 --> 00:02:33,300
to the hard drives or the discs in a

56
00:02:33,300 --> 00:02:36,010
specific machine or device. I can. Then

57
00:02:36,010 --> 00:02:38,070
use Win 32 you'll see I'm using the

58
00:02:38,070 --> 00:02:40,540
Asterix or the Star sign, which basically

59
00:02:40,540 --> 00:02:43,410
acts as a wild card. So I can then say Go

60
00:02:43,410 --> 00:02:46,300
and get me all of the related classes that

61
00:02:46,300 --> 00:02:48,220
would be available if I want to do

62
00:02:48,220 --> 00:02:50,020
something with the hard drives and the

63
00:02:50,020 --> 00:02:54,470
discs. If I then want to list any specific

64
00:02:54,470 --> 00:02:56,930
methods, then you'll see here that I'm

65
00:02:56,930 --> 00:02:59,760
using. Get Sim class again. I'm passing

66
00:02:59,760 --> 00:03:01,780
the class name and I haven't restricted

67
00:03:01,780 --> 00:03:03,710
it. I basically said, Get me everything.

68
00:03:03,710 --> 00:03:06,350
That's when 32 then what I'm looking for

69
00:03:06,350 --> 00:03:10,200
is method names that start with term

70
00:03:10,200 --> 00:03:13,480
something so it could be Star Term Star,

71
00:03:13,480 --> 00:03:15,010
which would be something that contains

72
00:03:15,010 --> 00:03:17,790
term. But in this instance, it's term

73
00:03:17,790 --> 00:03:21,670
something now. We could also still utilize

74
00:03:21,670 --> 00:03:24,070
the specific class connection, which we

75
00:03:24,070 --> 00:03:26,300
did previously I can say class name. And

76
00:03:26,300 --> 00:03:29,060
if I already know the name, such as Win 32

77
00:03:29,060 --> 00:03:30,990
underscore process, which will retrieve

78
00:03:30,990 --> 00:03:33,220
the processes, I could just retrieve that

79
00:03:33,220 --> 00:03:36,240
back, much like the operating system one

80
00:03:36,240 --> 00:03:38,030
and then lastly, we can use the same

81
00:03:38,030 --> 00:03:40,220
instance like we would have done in the W.

82
00:03:40,220 --> 00:03:43,350
M I. Where we can specify and name space

83
00:03:43,350 --> 00:03:46,040
Onda class name. Now if we set this to

84
00:03:46,040 --> 00:03:48,180
root and then underscore underscore name

85
00:03:48,180 --> 00:03:51,210
space, this allows me to view all of the

86
00:03:51,210 --> 00:03:53,130
name spaces and the class names that are

87
00:03:53,130 --> 00:03:55,880
available now. Another way of doing this

88
00:03:55,880 --> 00:03:58,070
is to use what's called the Sim Explorer.

89
00:03:58,070 --> 00:03:59,770
It's an older tool that's available

90
00:03:59,770 --> 00:04:02,870
online. It looks similar to this. It adds

91
00:04:02,870 --> 00:04:06,500
into the PowerShell. I see now I'm not

92
00:04:06,500 --> 00:04:08,090
going to encourage you to use PowerShell.

93
00:04:08,090 --> 00:04:10,190
I see, especially if you're using newer

94
00:04:10,190 --> 00:04:13,190
versions off PowerShell. But if you were

95
00:04:13,190 --> 00:04:16,370
to use it, we can connect it to a Windows

96
00:04:16,370 --> 00:04:19,220
machine inside the Sim Explorer tab that

97
00:04:19,220 --> 00:04:21,320
appears in the right hand side of the

98
00:04:21,320 --> 00:04:23,600
PowerShell. I see. And then I can

99
00:04:23,600 --> 00:04:26,590
innumerable IT the name spaces. So just

100
00:04:26,590 --> 00:04:28,920
like we chose route, and then I did

101
00:04:28,920 --> 00:04:31,090
underscore underscore name spaces that

102
00:04:31,090 --> 00:04:33,260
would allow this to break down. Now what

103
00:04:33,260 --> 00:04:36,400
we can do is then expand into the name

104
00:04:36,400 --> 00:04:39,990
spaces to then list the classes that

105
00:04:39,990 --> 00:04:42,150
reside underneath that, and then I could

106
00:04:42,150 --> 00:04:44,780
enumerate the properties and values that

107
00:04:44,780 --> 00:04:48,020
are inside those specific classes. So we

108
00:04:48,020 --> 00:04:50,460
can either do it using PowerShell or

109
00:04:50,460 --> 00:04:55,000
we can utilize a tool like this, um, explorer to navigate the structure for us

