Hardware Autogenerated Variables
The DeployR gather process is based on the process used in MDT and PSD (PowerShell Deploy), a project sponsored by 2Pint. The current gather script is available on GitHub. You can review it here: https://github.com/2pintsoftware/2Pint-DeployR/blob/main/Samples/PowerShell%20Scripts/Gather-TSVariables.ps1
These variables are created at the start of the task sequence, and you can use them in PowerShell scripts and conditions. The following list describes them:
Chassis
Description: This will return the Chassis type based on the system enclosure and creates the following additional variables:
IsDesktop
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 (there can be several)
WMI: Win32_NetworkAdapterConfiguration
Returned Values: MAC Address strings
PowerShell Code:
IPAddress
Description: Lists all IP addresses of the device (there can be several)
WMI: Win32_NetworkAdapterConfiguration
Returned Values: IP Address strings
PowerShell Code:
DefaultGateway
Description: The default gateway IP address of the machine
WMI: Win32_NetworkAdapterConfiguration
Returned Values: IP Address of gateway in string
PowerShell Code:
OSVersion
Description: The 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 architecture 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 relating 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 corresponding to memory
This value is often a little lower than the installed memory. If your device has 8 GB of RAM, the returned value is usually a bit under that, so if your own scripts check for 8 GB, allow a 1 GB buffer.
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, getting the information from a couple of locations if required.
WMI: Win32_ComputerSystem & Win32_BaseBoard
Returned Values: string values that correspond to details about the device's OEM information
PowerShell Code:
UUID
Description: Universally unique identifier of the device
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: String 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. Microsoft Surface and Dell use this for their OEM lookups
PowerShell Code:
IsUEFI
Description: Whether the device started in UEFI mode
PowerShell: Get-SecureBootUEFI
Returned Values: True | False
PowerShell Code:
SetupMode
Description: The firmware mode the device started in
PowerShell: Get-SecureBootUEFI
Returned Values: BIOS | UEFI
PowerShell Code:
IsOnBattery
Description: Created if the device has a battery and is currently running on it. If the device does not have a battery, or is on AC power, the variable is not created.
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: A number (0-85), translated to the edition name
PowerShell Code:
Last updated

