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 `
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.
Get-WmiObject command uses the
Win32_BIOS class to get information about BIOS.
Select-Object cmdlet selects the specified properties from the object. In this case, it selects the
The output of the above PowerShell script to get the serial number of the system is:
Cool Tip: How to get computer information using PowerShell!
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.