[Autogenerated] So let's compare the two
so W m I. If we talk about that first is
deprecate ID. They are not being changed.
Doesn't mean it disappeared, but in
Windows PowerShell itself an older
versions of PowerShell It still exists,
however, the W My commands are not
included with PowerShell core, which is
what PowerShell seven is built on. It uses
do calm for the communication. An example
of this would be get w my object. You
would then specify the object or the
property that you wish to retrieve, and
then you would get the values back now.
Sim, on the other hand, are the new
commands. It is included within PowerShell
Core and is available in PowerShell seven.
It uses a different communication protocol
instead of using do com, which has been
around for a long time. It uses what's
called do Bs Man protocol for the
communication, the comparison command.
Forget W My object is get sim instantiate.
The naming conventions have changed, but
the same instance and the W. My object
will allow us to effectively query the
same data and return the values. So let's
do a comparison between some commands so
first one. If I want to retrieve the
operating system details using W my I can
call, get w my object and then simply pass
in the class So the properties dash class
and then, as we've learned in the past,
it's prefixed us. Win 32 underscore, and
then whatever that would be So operating
system Now to do the same thing. Using
Sim, I'm going to use get Dash Sim
instance, still have the same property,
but this time it's called Class name. And
then I pass in the same object. So W my
object and Sim instantiate or W M. I and
Sim cmdlet SSHD are effectively the same.
Except you will find differences as you
execute the SIM commands, such as extra
properties, different options available to
us. So how do you find the same classes
and instances that you wish to utilize?
Well, first, off, we can use what's called
get Dash Sim class. This will list you all
of the SIM classes that are available. So
in the last example, we called Win 32
Underscore operating system, which would
be one of those classes. If I want to
list, for example, anything that's related
to the hard drives or the discs in a
specific machine or device. I can. Then
use Win 32 you'll see I'm using the
Asterix or the Star sign, which basically
acts as a wild card. So I can then say Go
and get me all of the related classes that
would be available if I want to do
something with the hard drives and the
discs. If I then want to list any specific
methods, then you'll see here that I'm
using. Get Sim class again. I'm passing
the class name and I haven't restricted
it. I basically said, Get me everything.
That's when 32 then what I'm looking for
is method names that start with term
something so it could be Star Term Star,
which would be something that contains
term. But in this instance, it's term
something now. We could also still utilize
the specific class connection, which we
did previously I can say class name. And
if I already know the name, such as Win 32
underscore process, which will retrieve
the processes, I could just retrieve that
back, much like the operating system one
and then lastly, we can use the same
instance like we would have done in the W.
M I. Where we can specify and name space
Onda class name. Now if we set this to
root and then underscore underscore name
space, this allows me to view all of the
name spaces and the class names that are
available now. Another way of doing this
is to use what's called the Sim Explorer.
It's an older tool that's available
online. It looks similar to this. It adds
into the PowerShell. I see now I'm not
going to encourage you to use PowerShell.
I see, especially if you're using newer
versions off PowerShell. But if you were
to use it, we can connect it to a Windows
machine inside the Sim Explorer tab that
appears in the right hand side of the
PowerShell. I see. And then I can
innumerable IT the name spaces. So just
like we chose route, and then I did
underscore underscore name spaces that
would allow this to break down. Now what
we can do is then expand into the name
spaces to then list the classes that
reside underneath that, and then I could
enumerate the properties and values that
are inside those specific classes. So we
can either do it using PowerShell or
we can utilize a tool like this, um, explorer to navigate the structure for us