Starting with the release of Windows 11 24H2 and Windows Server 2025, the WMIC command-line tool is no longer installed by default. Therefore, when attempting to run a WMI command directly or within a script, you will receive an error indicating that the wmic command was not found:
'wmic' is not recognized as an internal or external command, operable program or batch file.
The term 'wmic' is not recognized as the name of a cmdlet, function, script file, or operable program.
WMIC.exe
(Windows Management Instrumentation Command-Line utility) is a legacy command-line tool used to get information from a computer through the WMI interface. WMIC was officially deprecated in Windows Server operating systems starting in 2016, and in Windows 11 beginning in 2021, and no longer supported or developed by Microsoft.Beginning with Windows builds released in late 2024 (including Windows Server 2025 and Windows 11 24H2), the wmic utility is no longer installed by default in the OS image, as it has been deprecated. However, it is still available for installation as a Feature on Demand (FoD).
If your scripts rely on the wmic.exe command to retrieve system information (get serial numbers, OS versions, information about installed programs, view Windows Update history, etc) or perform some actions(for example, to uninstall programs), you should update them to eliminate the use of wmic command, replacing it with supported alternatives like PowerShell WMI/CIM cmdlets.
It is recommended to replace wmic with the PowerShell Get-CimInstance
cmdlet (alias gcim
) to query WMI. For example, the following command will display information about the Windows version and build number:
Get-CimInstance Win32_OperatingSystem | fl -Property Caption, Version, BuildNumber, OSArchitecture
Replace wmic in BAT files using the following PowerShell equivalent, especially when only a single value needs to be output:
powershell -noprofile -executionpolicy bypass -c "(gcim Win32_OperatingSystem).Caption"
If you still want to get WMIC back in Windows, you can add it from the optional features. Go to System -> Optional Features -> Add an optional feature. Find and install WMIC from the list of available features.
WMIC can also be installed using DISM:
DISM /Online /Add-Capability /CapabilityName:WMIC~~~~
Note that when running the command with the Help parameter, the following message appears:
WMIC is deprecated.