Hardware Autogenerated Variables
This page will cover several hardware variables that are autogenerated at the start of the task sequence, which you can then use for PowerShell scripts and conditions.
The DeployR gather process is based on the similar gather process used in MDT, but then updated for PSD (PowerShell Deploy), which is a project that was sponsored by 2Pint. You can take a look at it here for the specifics: C:\Program Files\2Pint Software\DeployR\Client\ContentStore\LocalGather\1.0\PSDGather.psm1
Below is a list of the variables created, with additional details
Chassis
Description: This will return the Chassis type based on the system enclosure and create the following additional variables;
IsDeskop
IsLaptop
IsServer
IsSFF
IsTablet
WMI: ClassName = Win32_SystemEnclosure
Returned Values:
Laptop [8,9,10,11,12,14,18,21]
Desktop [3,4,5,6,7,15,16]
Server [23]
Small Form Factor [34,35,36]
Tablet [13,31,32,30]
PowerShell Code:
MacAddress
Description: Lists all MAC addresses of the device, can be several
WMI: Win32_NetworkAdapterConfiguration
Returned Values: MAC Address strings
PowerShell Code:
IPAddress
Description: Lists all IP addresses of the device, can be several
WMI: Win32_NetworkAdapterConfiguration
Returned Values: IP Address strings
PowerShell Code:
DefaultGateway
Description: Is the default gateway IP Address of the machine
WMI: Win32_NetworkAdapterConfiguration
Returned Values: IP Address of gateway in string
PowerShell Code:
OSVersion
Description: the OS version of the OS currently running
Registry: HKLM:System\CurrentControlSet\Control\MiniNT
Returned Values: WinPE, Other
PowerShell Code:
OSCurrentVersion
Description: provides the Operating System's current version
WMI: Win32_OperatingSystem
Returned Values: OS Version Number, ex:
10.0.26100
10.0.22631
10.0.19045
PowerShell Code:
OSCurrentBuild
Description: provides the Operating System's build version
WMI: Win32_OperatingSystem
Returned Values: OS Build Number, ex:
26100
22631
19045
PowerShell Code:
Serial Number
Description: provides the serial number of the device
WMI: Win32_BIOS
Returned Values: serial number string
PowerShell Code:
Architecture
Description: provides the architechture of the processor
PowerShell: $env:PROCESSOR_ARCHITEW6432 or $env:PROCESSOR_ARCHITECTURE
Returned Values: x64, ARM64
PowerShell Code:
ProcessorSpeed
Description: provides the max clock speed of the processor
WMI: Win32_Processor
Returned Values: Number relateing to max clock speed of processor
PowerShell Code:
SupportsSLAT
Description: provides details about the Second Level Address Translation Extensions of the processor
WMI: Win32_Processor
Returned Values: True / False
PowerShell Code:
Memory
Description: provides a number of calculated memory in MB
WMI: Win32_ComputerSystem
Returned Values: Number corrisponding to memory
This will not equal exactly the GB you're expecting. If you have "8GB" of RAM in your device, this returned value will often come in a bit under that number, so if you are creating your own scripts with memory requirements, and you want a machine to have "8GB" of RAM, you should give a 1 GB buffer in your script.
PowerShell Code
PowerShell Example for GB for reference: (comes in just under the 64 that I expect)
Manufacturer | Make | Model
Description: provides the details of the device from the OEM, grabbing the info from a couple locations if requried.
WMI: Win32_ComputerSystem & Win32_BaseBoard
Returned Values: string values that correspond to details about the device's OEM information
PowerShell Code:
UUID
Description: Universal Identifier number
WMI: Win32_ComputerSystemProduct
Returned Values: GUID String
PowerShell Code:
CSPVersion
Description: provides the Chassis System Product Version set by the OEM
WMI: Win32_ComputerSystemProduct
Returned Values: Sting Value of Item(s) created by OEM
PowerShell Code:
BaseboardProduct
Description: provides the Baseboard Product value created by OEM
WMI: MS_SystemInformation
Returned Values: string, varies widely based on OEM
PowerShell Code:
Product
Description: provides the Baseboard Product value created by OEM
WMI: Win32_BaseBoard
Returned Values: string, varies widely based on OEM. HP uses this for their OEM lookups
PowerShell Code:
SystemSku
Description: provides the System SKU value created by OEM
WMI: MS_SystemInformation
Returned Values: string, varies widely based on OEM. MS Surface & Dell uses this for their OEM lookups
PowerShell Code:
IsUEFI
Description: Lists all mac addresses of the device, can be several
PowerShell: Get-SecureBootUEFI
Returned Values: True | False
PowerShell Code:
SetupMode
Description: Lists all mac addresses of the device, can be several
PowerShell: Get-SecureBootUEFI
Returned Values: BIOS | UEFI
PowerShell Code:
IsOnBattery
Description: is created if the device has a battery and is currently on battery. If it does not have a battery, or is currently on AC, it will skip creating the variable.
WMI: Win32_Battery
Returned Values: TRUE
PowerShell Code:
OSSku
Description: Determines the Edition or SKU of Windows on the computer, info from: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo
WMI: win32_operatingsystem
Returned Values: Number, 0-85 then Translated to Edition
PowerShell Code:
Last updated

