Applications Systems

Unable to poll OS Edition Information by Asset Inventory in SAM

This article describes the workaround to successfully poll the operating system edition information of the Microsoft Windows Server.

First published date

6/5/2025 1:13 PM

Last published date

9/17/2025 8:41 AM

Overview

In SAM 2024.4-2025.2, OS Edition is no longer polled by the Asset Inventory.

If the node's operating system was upgraded from Windows Server 2019 to Windows Server 2022 or 2025, SAM will not update the information in the Operating System widget (Asset Inventory sub-view), and will still show "Windows 2019 Server".

Expected result:

 

Product section

Server Application Monitor

Cause

This has been identified as a known issue, which will be fixed in the future release.

Resolution

Until the fix is available, you can use a workaround based on the Custom SWQL widget added to the Asset Inventory sub-view of the Node Details.

To do that, follow the steps below:

# Scripts are not supported under any SolarWinds support program or service.
# Scripts are provided AS IS without warranty of any kind. SolarWinds further
# disclaims all warranties including, without limitation, any implied warranties
# of merchantability or of fitness for a particular purpose. The risk arising
# out of the use or performance of the scripts and documentation stays with you.
# In no event shall SolarWinds or anyone else involved in the creation,
# production, or delivery of the scripts be liable for any damages whatsoever
# (including, without limitation, damages for loss of business profits, business
# interruption, loss of business information, or other pecuniary loss) arising
# out of the use of or inability to use the scripts or documentation.
#
# Compatible with PowerShell 2.0
#
# Get the OS Caption using WMI
$os = Get-WmiObject -Class Win32_OperatingSystem
if ($os -and $os.Caption) {
    Write-Host "Message: $($os.Caption)"
    Write-Host "Statistic: 1"
    exit 0  # Success
}
else {
    Write-Host "Message: Failed to retrieve OS information."
    Write-Host "Statistic: 0"
    exit 1  # Failure
}
  • Assign the template to the Windows nodes, providing credentials which are allowed to run PowerShell remotely.

  • Add Custom SWQL query widget on the Asset Inventory sub-view with the following SWQL query:

-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
--
SELECT ErrorMessage AS OS_Information
FROM Orion.APM.CurrentStatistics S
JOIN Orion.APM.Application A ON A.ApplicationID = S.ApplicationID
WHERE S.NodeID = ${NodeID}
AND A.Name = 'Windows OS information'