Get Computer Information Using Windows PowerShell

We use Get-WmiObject cmdlet to collect Information about computers in PowerShell. The below examples will provide you a better understanding of how we collect information about a computer system using Get-WmiObject cmdlet.

List Computer Manufacturer and Model

You can get the Computer Model Information using Win32_ComuterSystem class.

Example

PS C:\ > Get-WmiObject -Class Win32_ComputerSystem

Windows PowerShell

List Operating System (OS) Version Information

Win32_OperatingSystem provides version and Service Pack information of your Operating System.

Example

PS C:\ > Get-WmiObject -Class

Win32_OperatingSystem -ComputerName IND-DNS1

Windows PowerShell

List Processor Information

You can retrieve Processor information using Win32_Processor class.

Example

PS C:\> Get-WmiObject -Class -ComputerName IND-DNS1

Windows PowerShell

List BIOS Information

Win32_BIOS class will return complete information about your system BIOS.

Example

PS C:\> Get-WmiObject -Class Win32_BIOS -ComputerName IND-DNS1

Windows PowerShell

Desktop Settings

Win32_Desktop class returns the information about the desktops on your local computer.

Example

PS C:\> Get-WmiObject -Class Win32_Desktop -ComputerName IND-DNS1

Windows PowerShell

List Available Disk Space

Win32_LogicalDisk will return all the available disk on a local computer. You can use filters such as “DriveType” to get the space information of a specific drive.

Example

PS C:\> Get - WmiObject -Class Win32_LogicalDisk -ComputerName IND-DNS1

[ Note :This will return all the disks on your computer, if you want to find the available disk space on a specific drive, use -DriveType parameter and provide the value for that drive]

PS C:\ > Get - WmiObject -Class Win32_LogicalDisk -Filter “DriveType=3” -ComputerName IND-DNS1

Example

Windows PowerShell

List
Logon Session Information

Win32_LogonSession gives you the session information on a computer.

Example

PS C:\ > Get-WmiObject -Class Win32_LogonSession -ComputerName IND-DNS1

Windows PowerShell

List Local Time from a Computer

You can get local time from a computer using Win32_LocalTime class

Example

PS C:\> Get-WmiObject -Class Win32_LocalTime -ComputerName IND-DNS

Windows PowerShell

List Installed HotFixes

Win32_QuickFixEngineering return a list of HotFixes installed on a computer.

Example

PS C:\> Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName IND-DNS1

Windows PowerShell

List Service Status

Using Win32_Service class, you can view status of all services

on a computer

Example

PS C:\ >Get-WmiObject -Class Win32_Service -ComputerName IND-DNS1

Windows PowerShell

[ Tip: Use the below Cmdlet To find all the WMI Classes used so far. It will list all the WMI Classes]

PS C:\> Get-WmiObject -List

Up Next
    Ebook Download
    View all
    Learn
    View all