Home ยป PowerShell ยป How to Get the Serial Number of the Computer Using PowerShell

How to Get the Serial Number of the Computer Using PowerShell

To get the serial number of the computer in PowerShell, use the `Get-WmiObject` command. This command uses the Win32_BIOS class to get information about BIOS and a serial number using the `SerialNumber` property.

Here is a PowerShell command to get the serial number of the computer.

 Get-WmiObject -Class Win32_BIOS | Select-Object -Property SerialNumber    

In the above PowerShell script, the Get-WmiObject command returns the serial number of the computer.

The Get-WmiObject command uses the Win32_BIOS class to get information about BIOS.

The Select-Object cmdlet selects the specified properties from the object. In this case, it selects the SerialNumber property.

The output of the above PowerShell script to get the serial number of the system is:

Get the Serial Number of the Computer
Get the Serial Number of the Computer

Cool Tip: How to get computer information using PowerShell!

Conclusion

I hope the above article on how to get the serial number of the computer using the PowerShell Get-WmiObject command is helpful to you.

Cool Tip: How to get MACAddress of a remote computer in PowerShell!

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.