Running the following commands will help you to gather system information using WMI and Registry query. The Sample script contains all commands explained in this file.
Running the following commands will help you to gather system information using WMI.
wmic baseboard list full
Output is for example:
Product: CB6464
Version: G3
You can get a brief overview of the installed updates in the command line via the following command:
Wmic qfe list brief
or
Wmic qfe list
to get a complete overview of all updates and their information (e.g. description, caption, etc.).
Wmic os get BuildNumber
Output is:
Buildnumber
14393
With the help of the CMD, information about the image can be read out easily. For example, all keys and values under a registry key can be read out as follows:
reg query <keyname> <valuename> /v
And the value of a specific key as follows:
reg query <keyname> /s
Image and device information in Beckhoff Images can be found at:
HKLM\SOFTWARE\Beckhoff\IPC
Get image:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v Image
Output is for example:
Image REG_SZ IN-0406-0112-02-1
Get version:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v Version
Output is for example:
Version REG_SZ 2020-20-0001U
Get edition:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v EditionId
Output is for example:
EditionId REG_SZ 2016 LTSB
Get driver package:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v DriverPackage
Output is for example:
Driverpackage REG_SZ 3.1.8
Get baseboard:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v platform
Output is for example:
Platform REG_SZ CB3064
Get computer name:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v LastComputerName
Output is for example:
LastComputerName REG_SZ CP-XXXXXX
Get MAC:
Reg query HKLM\SOFTWARE\Beckhoff\IPC /v FirstMACId
Output is for example:
LastComputerName REG_BINARY 0000105xxxxxx
Get Update Build Revision in hex:
Reg query “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion” /v UBR
Output is for example:
LastComputerName REG_DWORD 0xea6