You run a simple OMI query from Linux, macOS, or another Windows host:
omicli query "SELECT * FROM Win32_OperatingSystem"
Or via Python with pyomi:
session.query("SELECT * FROM Win32_OperatingSystem")
Expected result: OS details (name, version, serial number, etc.).
Actual result: Nothing — an empty list, a null response, or a "class not found" error. win32-operatingsystem result not found via omi
The failure is rarely due to the class definition itself missing, but rather how OMI interacts with the underlying OS data sources. There are three primary causes for this behavior:
Always include the namespace in your OMI query: You run a simple OMI query from Linux,
omicli query root/cimv2 "SELECT * FROM Win32_OperatingSystem"
In Python:
session.query("SELECT * FROM Win32_OperatingSystem", namespace="root/cimv2")
from omi import Client, Queryclient = Client("https://your-windows-host:5986", username="domain\user", password="password", auth="basic") client.namespace = "root/cimv2" Or via Python with pyomi : session
query = Query("SELECT * FROM Win32_OperatingSystem") result = client.query(query)
for instance in result: print(instance.Caption, instance.Version)