Solutions
Device management
Remotely manage, and protect laptops and mobile devices.
Orchestration
Automate tasks across devices, from app installs to scripts.
Software management
Inventory, patch, and manage installed software.
Extend Fleet
Integrate your favorite tools with Fleet.
Customers
Stripe + Fleet
Stripe consolidates multiple tools with Fleet.
Foursquare + Fleet
Foursquare quickly migrates to Fleet for device management.
What people are saying
Stories from the Fleet community.
More
Fleet’s built-in queries for collecting and storing important device information.
Operating system version
Retrieves operating system version information from a Windows device.
WITH display_version_table AS (
SELECT data as display_version
FROM registry
WHERE path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\DisplayVersion'
),
ubr_table AS (
SELECT data AS ubr
FROM registry
WHERE path ='HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\UBR'
)
SELECT
os.name,
COALESCE(d.display_version, '') AS display_version,
COALESCE(CONCAT((SELECT version FROM os_version), '.', u.ubr), k.version) AS version
FROM
os_version os,
kernel_info k
LEFT JOIN
display_version_table d
LEFT JOIN
ubr_table u
$os = Get-CimInstance -ClassName Win32_OperatingSystem
$osName = $os.Caption
$osVersion = $os.Version
$regPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
try {
$displayVersionObj = Get-ItemProperty -Path $regPath -Name 'DisplayVersion' -ErrorAction Stop
$displayVersion = $displayVersionObj.DisplayVersion
} catch {
$displayVersion = ""
}
try {
$ubrObj = Get-ItemProperty -Path $regPath -Name 'UBR' -ErrorAction Stop
$ubr = $ubrObj.UBR
} catch {
$ubr = $null
}
$kernelVersion = [System.Environment]::OSVersion.Version.ToString()
if ($ubr) {
$finalVersion = "$osVersion.$ubr"
} else {
$finalVersion = $kernelVersion
}
Write-Output "Name: $osName"
Write-Output "DisplayVersion: $displayVersion"
Write-Output "Version: $finalVersion"
PowerShell commands are currently work in progress, contributions welcome.
Bash commands are currently work in progress, contributions welcome.
Vitals