Winmgmt is the WMI service within the SVCHOST process that runs under the LocalSystem account. In all cases, automatically the WMI service starts once the first management application or script requests connection to a WMI namespace. For your information, WMI is a core component of the Windows operating system which offers developers and IT administrators to write scripts and applications to automate certain tasks.
Winmgmt.exe is the service that offers WMI to run on your local computer. If you have got an error message about winmgmt.exe, see WMI Troubleshooting. Winmgmt provides a common interface and object model to access management information regarding operating systems, applications, devices, and services. If this service is stopped, most Windows-based software cannot function correctly. If this service is disabled, any services which explicitly depend on it can fail to start. Also, this service exists in Windows 7, 8, Vista and XP.
- Display name: Windows Management Instrumentation
- Service name: winmgmt
- Type: share
- Path: %WinDir%\system32\svchost.exe -k netsvcs -p
- File: %WinDir%\system32\wbem\WMIsvc.dll
- Error control: ignore
- Object: localSystem
You have to know that the Windows Management Instrumentation service is running as localSystem in a process of svchost.exe. Other services may run in the same process. If Windows Management Instrumentation cannot load or initialize, so Windows 10 start up results. There is no warning displayed, however the error is recorded into the Event Log.
Apparently, Windows Management Instrumentation is unable to start, if the RPC (Remote Procedure Call) service is stopped or disabled. If Windows Management Instrumentation is stopped, the services such as Internet Connection Sharing (ICS), IP Helper and Security Center cannot start.
RESTORE DEFAULT STARTUP TYPE FOR WINDOWS MANAGEMENT INSTRUMENTATION
- At the first step, you have to choose your Windows 10, and then click on the Download button.
- After that, you are able to save the RestoreWindowsManagementInstrumentationWindows10.bat file to any folder on your hard drive.
- Now, you need to right-click the downloaded batch file and choose Run as administrator.
- The last step that you have to do is to restart the computer to save changes.
For note: Ensure that the WMIsvc.dll file exists in the %WinDir%\system32\wbem folder. If this file is missing you are able to try to restore it from your Windows 10 installation media.
STARTING AND STOPPING THE WMI SERVICE
As we know that WMI runs as a service with the display name “Windows Management Instrumentation” and the service name “winmgmt”. WMI runs at system startup under the LocalSystem account automatically. If WMI is not running, automatically it starts once the first management application/ script requests connection to a WMI namespace. Some other services are dependent upon the WMI service, depending on the operating system version which the system is running.
STARTING WINMGMT SERVICE
The following text explains how to start the WMI service.
To start Winmgmt Service:
- At a command prompt, you need to enter net start winmgmt [/]. For more information regarding the switches which are available, see the page of winmgmt on the site of microsoft. You use an account in the Administrators group running with elevated rights to start the WMI service.
- Other services which are dependent on the WMI service, such as Windows Firewall or SMS Agent Host will not be restarted automatically.
STOPPING WINMGMT SERVICE
The following text explains how to stop the WMI Service.
To stop Winmgmt Service:
- At a command prompt, you have to enter net stop winmgmt.
- Other services which are dependent on the WMI service also stop, such as Windows Firewall or SMS Agent Host.
You are able to use WMI from client applications and scripts. It gives an infrastructure that makes it easy to both discover and perform management tasks. Additionally, you are able to add to the set of possible management tasks by making your own WMI providers.
OBTAINING DATA FROM WMI
The following text explains how to obtain data from WMI by writing a script or application.
To get data from WMI by writing a script/application:
- Firstly, you need to decide which language to use. You are able to view or manipulate WMI data in lots of languages.
- Then, you have to make sure that your connections to remote computers work.
- Connecting to WMI on remote computers needs the valid security settings, as explained in Maintaining WMI Security.
- After connecting to WMI, you are able to get data through queries and enumerations.
- Registry data is available through WMI. You will be able to make new keys and values or modify existing ones.
- Also, you are able to subscribe to event notifications through WMI temporarily between system reboots or permanently.
- Remember that performance counter data for a system is available through WMI. While the system performance library counters are changed to WMI classes.
- WMI Tasks for the scripts and applications explains how to do many administrative tasks with WMI.
PROVIDING DATA TO WMI
The following text explains how to provide data to WMI by writing a provider.
To provide data to WMI by writing a provider:
Firstly, you have to decide on the type of provider to write. You cannot write a WMI provider in VBScript. But, you will be able to take some approaches to writing a WMI COM provider:
- The first one, you are able to use the WMI ATL Wizard in Visual Studio. This approach will make an unmanaged COM provider.
- The second one, you are able to use COM directly in any integrated development environment. This approach will make an unmanaged COM provider.
- The third one, you are able to use WMI in the .NET Framework to make a managed code provider. This approach will make a managed code provider. For your information, managed code providers are able to be written in any .net Framework language, and can get data from the WMI CIM-based classes such as Win32 Classes.