Skip to content

What is WINMGMT Windows command?

The WINMGMT command in Windows is a crucial tool for managing the Windows Management Instrumentation (WMI) infrastructure. It enables users to interact with WMI, retrieve information, run queries, and execute tasks efficiently.

WINMGMT Syntax:

Terminal window
winmgmt [/backup|/restore] [/adap] [/clearadap] [/wipeadap] [/resyncperf] [/killperf] [/salvagerepository] [/resetrepository] [/register] [/upgrade] [/recoveros] [/setuguid] [/verifyrepository] [/winmgmt:remote=<ComputerName>] [/configlog=<logfile>] [/sysparm=<sysparm>] [/tunesys=<num>]

WINMGMT Options:

OptionDescription
/backupBacks up the WMI repository.
/restoreRestores the WMI repository from a backup.
/adapRebuilds the WMI repository from ADAP files.
/clearadapClears the existing ADAP files.
/wipeadapWipes out all ADAP files.
/resyncperfResynchronizes performance counters.
/killperfTerminates a process that is using the WMI Performance Adapter.
/salvagerepositoryPerforms a consistency check on the WMI repository and rebuilds it if necessary.
/resetrepositoryResets the repository to its initial state.
/registerRegisters all the system providers.
/upgradeUpgrades the WMI repository schema.
/recoverosRecovers objects to a consistent state after a critical failure.
/setuguidSets the universally unique identifier (UUID) of the computer.
/verifyrepositoryVerifies the consistency of the WMI repository.
/winmgmt:remote Specifies a remote computer to manage.
/configlogSpecifies a log file for the WMI log.
/sysparmSpecifies system parameters.
/tunesysSpecifies the tuning parameter.

Parameters:

ParameterDescription
BackupFileThe path to the file where the backup will be saved.
ComputerNameThe name of the remote computer to manage.
LogFileThe path to the log file for the WMI process.
SysParamSystem parameters for WMI.
NumThe tuning parameter value.

WINMGMT Command Usage Examples:

Check Windows Management Instrumentation Service Status

Terminal window
winmgmt /verifyrepository

Verifies the Windows Management Instrumentation (WMI) repository for consistency.

Force a WMI Repository Verification

Terminal window
winmgmt /salvagerepository

Forces a verification and repair of the WMI repository.

Reset WMI Repository to Consistent State

Terminal window
winmgmt /resetrepository

Resets the WMI repository to a consistent state.

Create a New Repository for WMI

Terminal window
winmgmt /resetrepository

Creates a new WMI repository.

Check and Repair WMI Repository

Terminal window
winmgmt /resyncperf

Checks and repairs the WMI repository to ensure performance counters are up to date.

How do I use winmgmt in Windows?

To use the winmgmt command in CMD, execute the following command:

Terminal window
winmgmt /?

What is the purpose of the winmgmt command in Windows?

The winmgmt command in Windows is used for various purposes related to Windows Management Instrumentation (WMI) such as managing WMI and its repositories.

How can I check the health of WMI using winmgmt?

To check the health of WMI using winmgmt, run the following command:

Terminal window
winmgmt /verifyrepository

How can I reset the WMI repository using winmgmt?

To reset the WMI repository using winmgmt, execute the following command:

Terminal window
winmgmt /resetrepository

Can winmgmt be used to stop the WMI service?

Yes, you can stop the WMI service using winmgmt. Use the following command:

Terminal window
winmgmt /kill

How do I check the version of WMI on my system with winmgmt?

To check the version of WMI on your system using winmgmt, run the command:

Terminal window
winmgmt /checkversion

Is there a way to resync performance counters with winmgmt?

Yes, you can resynchronize performance counters using winmgmt. Use the following command:

Terminal window
winmgmt /resyncperf

Applications of the WINMGMT Command

  • Start the Windows Management Instrumentation service
  • Stop the Windows Management Instrumentation service
  • View information about the Windows Management Instrumentation service
  • Register or unregister WMI providers
  • View system properties using the WMI command-line interface
  • View and modify system settings using WMI