>> Hello everyone. I'm instructor Jerry Roberts,
and this is PowerShell scripting.
In this video, we're going to talk
about how to get some computer information,
and we're going to use a CIMinstance command.
To do that, we're going to look at CIMinstance,
we're going to look at the get CIMinstance command,
and then we're going to look at some classes
for CIMinstance,
which are the Win32 desktop,
Win32 bios, Win32 processor,
and Win32 computer system classes.
Using CIMinstance to get computer information.
Now, we can use the CIMinstance
>> to get information about a computer.
>> CIM actually stands for Common Information Module.
This particular module works with WMI,
which is the Windows Management Instrumentation,
>> to gather information.
>> You may be familiar with WMI if
you've worked with remote computers before.
The get CIMinstance command
>> is a command that we actually
>> use to get the information about a computer.
With the command, you have to
specify an item you want to get,
thus where the dash class name portion comes into play.
This particular parameter allows you to
specify which class of information you want to get.
Another parameter you can use is dash computer name.
Now, if you're running the command locally,
you don't have to use computer name.
Computer name is used solely for when you're
>> working with another computer other than
>> the one that you're currently using.
That would be say, if you're connecting
remotely to another server or another client,
and trying to gather information about it.
A couple of classes for our CIMinstance.
The first one is Win32_desktop.
This particular one does what it sounds like,
and it gets information about the desktop.
It will gather information about
all the desktops on a specified computer,
whether or not they are in use.
The next one is Win 32_ BIOS.
This one also does when it sounds like,
it gives information for the BIOS as well as UEFI.
Processor is another one we can use,
and the win 32_ processor
does exactly what it sounds like as well
and gets information for
your processor or processors of that computer.
The Win 32_ Computer System is another useful class,
and this class lists information
about the computer manufacturer and model.
It's now time for a short demo,
so we can take a look at CIMinstance in action.
Now that we have PowerShell up,
we can take a look at the get CIMinstance in action.
When you're doing that, you do get
CIMinstance space dash class name,
and you specify which class
you want to get information about.
We're going to go through the couple,
we went through the PowerPoint just so
you can take a look at what that looks like.
The first one we're going to do is win32_ desktop.
That shows us that there are
a couple of desktops in this particular machine.
There's a system, a local service,
a network service,
there's mine, and there's of course the default.
All these settings are located in your registry.
Now, the next one we want to look
at is going to be BIOS information,
so we do get CIMinstance-class name win32_bios.
Now we have information about the bios.
Next, we'll take a look at processor.
It's get-ciminstance - class name win32_processor.
Here I have more information about my processor.
Now, if I wanted to make that look a little bit better,
I could pipe in a format list,
and you would get a little bit better
outputs so you could read it.
Now, one thing you would want to notice here
is that when you're pulling
this information and doing the commands,
this is not a case sensitive module.
Anytime you do get CIMinstance,
you don't have to be very careful about the case.
The last one we're going to do is we're going to do
the win32_ computer system,
and you get information about the particular computer.
Now, again, this is one of the ones
>> you're probably going to want
>> a format list so it looks a little bit better.
But you get the idea there,
that these particular classes give you quite a bit of
information about different pieces on your system.
These are super useful,
especially in an enterprise
environment when you're trying to get
information about all of
the computers that are working on the network,
so you have a better idea of
a baseline as well as what you're working with,
and whether you need to do updates or
you need to change out equipment.
Also, notice that when I put and Get-CIMinstance,
I didn't do the dash class name.
This is one of those instances in
which the perimeter order counts,
so you can put the value in,
and not have to do the parameter name itself.
The parameter's still required, just not the name.
Now that we've finished our demo, it's onto quiz.
This post assessment question wants you to
know if you wanted to list
information about the computer bios,
which CIMinstance class would you use?
Would you use a win32_ computer system,
the win32 bios,
the win32_bios, or the win 32 processors?
I'll go ahead and give you a second
to see if you can figure that out.
You can also pause the video if you'd like.
The answer is C, win32_ bios.
Remember, when 32_bios is a class,
it contains information about the bias and the UV.
In this video, we learned some information about
getting computer information using Get-CIMinstance.