How to Obtain Computer Information using PowerShell

In this article, we will be using the command Get-CimInstance to obtain information on Desktop setting, Bios version, Processor, Disk, Local Time etc.

There are lots of information can be captured and below example commands are only some of it. You can explore it, yourself!

Bios Version

Command to get information on bios.

Get-CimInstance -ClassName Win32_BIOS


SMBIOSBIOSVersion : ABCD1234 (1.10 )
Manufacturer      : LENOVO
Name              : ABCD1234 (v1.10 )
SerialNumber      : ABCD1234
Version           : LENOVO - 0

Desktop Setting

The command below will list the current setting for desktop.

Get-CimInstance -ClassName Win32_Desktop

SettingID                 Name             ScreenSaverActive         ScreenSaverSecure         ScreenSaverTimeout
---------                 ----             -----------------         -----------------         ------------------
                          NT AUTHORITY\... True
                          itsiti       False                     True                      300
                          .DEFAULT         True

Processor Information

Getting information on processor.

Get-CimInstance -ClassName Win32_Processor

DeviceID                     Name             Caption                      MaxClockSpeed                SocketDesignation           Manufacturer
--------                     ----             -------                      -------------                -----------------           ------------
CPU0                         Intel(R) Core... Intel64 Family 6 Model 78... 2401                         U3E1                        GenuineIntel
Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object -Property SystemType

SystemType
----------
x64-based PC

Computer Model & Manufacturer

The command is tend for information on model and manufacturer but, you can also find the information on Memory and Domain.

Get-CimInstance -ClassName Win32_ComputerSystem

Name             PrimaryOwnerName             Domain                       TotalPhysicalMemory          Model                       Manufacturer
----             ----------------             ------                       -------------------          -----                       ------------
ITSITI1234         Windows User                 domain.itsiti.com     7972667392                   21234S2ABCJ                  LENOVO

Listing Installed Hotfixes

Find out the installed hotfixes in your computer

Get-CimInstance -ClassName Win32_QuickFixEngineering

Source        Description      HotFixID      InstalledBy          InstalledOn
------        -----------      --------      -----------          -----------
              Update           KB2849697     ITSITI\Administ... 1/8/2015 12:00:00 AM
              Update           KB2849696     ITSITI\Administ... 1/8/2015 12:00:00 AM
              Update           KB2841134     ITSITI\Administ... 1/8/2015 12:00:00 AM
              Update           KB2670838     ITSITI\Administ... 1/8/2015 12:00:00 AM
              Update           KB2830477     ITSITI\Administ...
              Update           KB2592687     ITSITI\Administ... 6/4/2013 12:00:00 AM
              Update           KB2819745     NT AUTHORITY\SYSTEM
              Security Update  KB2479943     ITSITI\Administ... 6/5/2013 12:00:00 AM
              Update           KB2492386     NT AUTHORITY\SYSTEM
              Security Update  KB2503665     NT AUTHORITY\SYSTEM
              Security Update  KB2506212     ITSITI\Administ... 6/5/2013 12:00:00 AM
              Security Update  KB2509553     ITSITI\Administ... 

Get OS Version (Build / Service Pack)

To get the operating system version.

Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion


BuildNumber             : 7601
BuildType               : Multiprocessor Free
OSType                  : 18
ServicePackMajorVersion : 1
ServicePackMinorVersion : 0

Disk Space Availability

Obtain the disk space information.

Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=3"

DeviceID                        DriveType                       ProviderName     VolumeName       Size                           FreeSpace
--------                        ---------                       ------------     ----------       ----                           ---------
C:                              3                                                                 255533772800                   128164405248

Logon Information

You can get the logon information using below command

Get-CimInstance -ClassName Win32_LogonSession

LogonId                              Name             LogonType                            StartTime                            Status
-------                              ----             ---------                            ---------                            ------
1199014                                               2                                    21/2/2019 6:28:34 AM

Local Time on Computer

Use below command, to get the local time from the computer.

Get-CimInstance -ClassName Win32_LocalTime


Day            : 21
DayOfWeek      : 4
Hour           : 8
Milliseconds   :
Minute         : 28
Month          : 2
Quarter        : 1
Second         : 35
WeekInMonth    : 4
Year           : 2019
PSComputerName :

You May Also Like

Leave a Reply?