DTLsaysWhat — Reference Manual

version1.0 platformWindows only scriptDTLsaysWhat.py

Overview

DTLsaysWhat is a Windows system inventory tool written in Python, inspired by the What internal use only Utility written by Stanley Rabinowitz for the DEC VAX/VMS systems in the 80s. It collects detailed information about the local or a remote Windows machine across up to 20 functional categories, and produces both a plain-text report and a navigable HTML report, automatically saved to disk at the end of each run.

Requirements

Python dependencies

The following third-party packages must be installed before use:

pip install wmi pywin32 psutil

The standard library modules used (argparse, ctypes, datetime, io, os, socket, subprocess, sys, winreg) require no additional installation.

Privileges

Some categories (Security, BitLocker, Hyper-V, TPM, Secure Boot, Scheduled Tasks, Firewall) may require the script to be run with elevated privileges (Run as Administrator). Without elevation, those sections may return partial or no data.

Encoding

On French-language Windows systems, cmd.exe defaults to OEM code page 850. The tool detects and handles this automatically. To guarantee correct display of accented characters, it is recommended to either:

Command syntax

python DTLsaysWhat.py [CATEGORY] [--output FILE] [--computer NAME_OR_IP]

All arguments are optional. When called with no arguments, the tool defaults to the system category and targets the local machine.

Arguments

Positional argument: CATEGORY

Specifies which inventory category to collect. If omitted, defaults to system.

CategoryDescription
allRuns all categories sequentially
systemOS identification, version, architecture, uptime, timezone
hardwareCPU, motherboard, BIOS/UEFI
memoryRAM totals, virtual memory, physical DIMM slots
diskPhysical drives and logical volumes
gpuGraphics adapters, VRAM, current resolution, driver version
networkNetwork interfaces, IP addresses, routing table, DNS, active TCP connections, SMB shares, mapped drives, proxy settings
softwareInstalled applications (from registry), AppX/Store packages
servicesRunning services, stopped services with automatic start mode
processesAll currently running processes with PID, RAM usage, CPU time
startupStartup entries from WMI and from HKLM/HKCU registry Run keys
securityWindows Defender status, firewall profiles, BitLocker, Secure Boot, TPM
updatesInstalled Windows hotfixes and updates (KB numbers)
driversSigned PnP drivers with version and manufacturer
usersLocal accounts, user profiles, current session user and admin status
tasksActive (non-disabled) scheduled tasks outside the Microsoft namespace
sharesLocal SMB shares and mapped network drives
eventsLast 20 errors and warnings from System and Application event logs
perfInstantaneous CPU load per core, memory usage, disk usage per volume
virtVM detection (VMware, VirtualBox, Hyper-V, QEMU, KVM, Xen), Hyper-V role status, hosted VMs, WSL distributions

Option: --output FILE  short form: -o FILE

Specifies the path and filename for the text report output. If this option is omitted, the tool automatically generates a filename using the format:

DTLsaysWhat_<HOSTNAME>_<YYYYMMDD_HHMMSS>.txt

The file is written to the current working directory.

Option: --computer NAME_OR_IP

Specifies the target machine for data collection. Accepts either a NetBIOS name or an IP address. Defaults to the local machine's hostname. Remote collection relies on WMI and requires appropriate network access and permissions on the target machine.

Output files

Each run produces two files automatically:

Text report (.txt): Plain UTF-8 text file containing the full console output, structured with section headers and subsection separators.

HTML report (.html): A self-contained HTML file with a dark terminal aesthetic (green-on-black, monospace font). It includes a fixed left-side navigation sidebar linking to each major section, allowing quick navigation across large reports. Both files share the same base name, differing only in extension.

If --output is specified as report.txt, the HTML file is saved as report.html. If the output path does not end in .txt, .html is appended to the full path.

Data sources

The tool collects data through five complementary mechanisms:

WMI (Windows Management Instrumentation): Used for the majority of hardware, OS, software, service, driver, update, and user data. WMI queries can target a remote machine when --computer is specified.

PowerShell cmdlets: Used for categories that have no direct WMI equivalent or where PowerShell provides richer output. Affected categories include: security, users, tasks, software (AppX packages), events, virt. PowerShell is invoked with UTF-8 output encoding enforced.

Windows native commands: Used selectively within the network category: ipconfig /all for gateway and DNS information, route print for the routing table, net share and net use for SMB shares and mapped drives.

Windows Registry: Used for proxy settings (HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings) and startup entries (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run), and for OEM code page detection.

psutil: Used for real-time process enumeration, network interface statistics, active TCP connections, and instantaneous performance metrics (CPU per core, memory, disk usage).

Categories: data collected

system

WMI queries

Win32_ComputerSystem, Win32_ComputerSystemProduct, Win32_SystemEnclosure, Win32_OperatingSystem, Win32_TimeZone

Reported fields

Machine name, domain or workgroup membership, manufacturer, model, serial number, UUID, chassis type, OS caption, version and build number, architecture, Windows directory, installation date, last boot time, computed uptime, timezone.

hardware

WMI queries

Win32_Processor, Win32_BaseBoard, Win32_BIOS

Reported fields

CPU name, manufacturer, physical and logical core count, base frequency, socket designation, architecture, L2 and L3 cache sizes; motherboard manufacturer, product name, version, serial number; BIOS/UEFI manufacturer, SMBIOS version, release date.

memory

WMI queries

Win32_OperatingSystem, Win32_PhysicalMemory

Reported fields

Total and available physical RAM, total and free virtual memory; per-DIMM slot: bank label, capacity, speed (MHz), memory type (DDR generation), manufacturer, serial number; total DIMM count.

disk

WMI queries

Win32_DiskDrive, Win32_LogicalDisk

Reported fields

Per physical disk: index, model, size, interface type, partition count, serial number, status; per logical volume: drive letter, type (removable/fixed/network/CD/RAM), filesystem, total size, free space, volume label.

gpu

WMI queries

Win32_VideoController

Reported fields

Adapter name, manufacturer, VRAM, current horizontal and vertical resolution, refresh rate, driver version and date, status.

network

Data sources

psutil (net_if_addrs, net_if_stats, net_connections), ipconfig /all, route print, net share, net use, Windows Registry

Reported fields

Per interface: name, up/down status, link speed, IPv4/IPv6/MAC addresses; default gateways; configured DNS servers; full routing table; established TCP connections (local and remote address/port); local SMB shares; mapped network drives; proxy configuration (enabled/disabled, server address).

software

Data sources

Windows Registry (HKLM and HKCU Uninstall keys, including Wow6432Node for 32-bit applications), PowerShell Get-AppxPackage

Reported fields

Installed applications sorted alphabetically (name, version, publisher); total application count; AppX/Store package list (name, version).

services

WMI queries

Win32_Service

Reported fields

All currently running services (display name, start mode); all stopped services with start mode set to Automatic (display name, current state).

processes

Data source

psutil process_iter

Reported fields

Per process: name, PID, RSS memory usage, total CPU time (user + system, in seconds). Sorted alphabetically by process name.

startup

Data sources

WMI Win32_StartupCommand, Windows Registry Run keys

Reported fields

WMI startup entries (name, associated user, command line); HKLM Run entries (value name, command); HKCU Run entries (value name, command).

security

Data sources

PowerShell Get-MpComputerStatus, Get-NetFirewallProfile, Get-BitLockerVolume, Confirm-SecureBootUEFI, Get-Tpm

Reported fields

Windows Defender status (enabled, signature version, signature date, real-time protection, antispyware); per firewall profile (domain/private/public): enabled state, default inbound and outbound actions; BitLocker status per volume (mount point, volume status, protection status); Secure Boot state; TPM properties.

updates

WMI queries

Win32_QuickFixEngineering

Reported fields

Per hotfix: KB identifier, installation date, installing account, description. Sorted by installation date, most recent first.

drivers

WMI queries

Win32_PnPSignedDriver

Reported fields

Per driver: device name, driver version, manufacturer. Sorted alphabetically by device name. Only entries with a non-empty device name are included.

users

Data sources

PowerShell Get-LocalUser, WMI Win32_UserProfile, environment variables (USERNAME, USERDOMAIN), Windows API IsUserAnAdmin

Reported fields

Local accounts (name, enabled state, last logon); user profiles (local path, loaded state), excluding special system profiles; current session user (domain and account name, administrator status).

tasks

Data source

PowerShell Get-ScheduledTask

Reported fields

Non-disabled scheduled tasks outside the \Microsoft\* namespace (task path, task name, state). Sorted by task path.

shares

WMI queries

Win32_Share, Win32_NetworkConnection

Reported fields

Local SMB shares (name, path, description); mapped network drives (local drive letter, remote UNC path, connection status).

events

Data source

PowerShell Get-EventLog

Reported fields

Last 20 errors and warnings from the System event log, then from the Application event log. Per entry: timestamp, entry type (Error/Warning), event ID, message text.

perf

Data source

psutil (cpu_percent, virtual_memory, swap_memory, disk_partitions, disk_usage)

Reported fields

CPU usage percentage per logical core (1-second sample); global CPU load; total, used, and available physical memory with percentage; swap total and used; per mounted volume: used and total space with percentage and filesystem type. Volumes with permission errors are noted.

virt

Data sources

WMI Win32_ComputerSystem, Win32_BIOS; PowerShell Get-WindowsOptionalFeature, Get-VM; wsl --list --verbose

Reported fields

VM detection result based on model, manufacturer, and BIOS version strings (checked against VMware, VirtualBox, Hyper-V, VBOX, QEMU, KVM, Xen, Microsoft Corporation); Hyper-V Windows feature state; list of hosted VMs if Hyper-V role is active (name, state, assigned memory, generation); WSL distribution list.

Exit behavior

The tool always writes output files before exiting, regardless of category. If writing to the specified or auto-generated path fails (permission error, invalid path), an error message is printed to the console and the corresponding file is skipped. The other output file (text or HTML) is still attempted independently.

Known limitations