Common WMIC Commands Replaced With PowerShell
Instead of legacy wmic commands, run these faster native PowerShell CIM queries:
# Laptop / PC Serial Number:
(Get-CimInstance Win32_BIOS).SerialNumber
# Motherboard Manufacturer & Model:
Get-CimInstance Win32_BaseBoard | Select Manufacturer,Product
# Embedded OEM Windows Product Key (UEFI Firmware):
(Get-CimInstance SoftwareLicensingService).OA3xOriginalProductKey
# Disk Drives & Models:
Get-CimInstance Win32_DiskDrive | Select Model,InterfaceType,@{N='GB';E={[math]::Round($_.Size/1GB)}}