Windows node exporter install error
Posted: 2026 Aug 04, 10:12
Service failed to start during MSI install. Fix:
Click Ignore to finish install.
Check port conflict:
Check service log: Event Viewer → Windows Logs → System, filter for windows_exporter
Verify config file syntax if using --config.file (YAML) or collector flags — bad flags in service args cause immediate exit.
Check service binary path/args:
Try manual start for real error:
If installed with custom collectors (--collectors.enabled=...), invalid collector name = crash on start.
WMI Performance Adapter (WmiApSrv) is disabled. Enable it:
Then restart windows_exporter:
Check dependent adapter status after:
Default port 9182:
From another host:
Check listener:
Firewall rule if remote access fails:
windows exporter config.yaml
Debugs:
WmiApSrv dependency stopped (disabled or crashed). Check and restart it:
If stopped/disabled:
Then:
If wmiapsrv fails to start, check Event Viewer → System log for a fresh error on it, or run:
Set startup type to Automatic:
Recommended: delayed-auto to avoid boot-time race conditions with WMI:
Start it now:
Verify:
Add commands to run at startup:
Open Task Scheduler and select Create Basic Task.
Name the task and set the trigger to When the computer starts.
For the action, select Start a program.
In the "Program/script" field, enter cmd.exe.
In the "Add arguments" field, enter /k your_command_here (or /c to close the window after running).
Note: Check Run with highest privileges if the command requires admin rights.
Command Line Alternative: You can also create a scheduled task programmatically using:
Command Breakdown
/create: Instructs schtasks.exe to create a new scheduled task.
/tn "StartupTask": Specifies the Task Name. This is the unique identifier for the task in the Task Scheduler library.
/ru SYSTEM: Defines the Run User account. Setting this to SYSTEM executes the task under the local System account, which has higher privileges than standard administrator accounts and is used by the OS itself.
/Sc ONSTART: Sets the Schedule type to ONSTART. This triggers the task immediately after the Windows kernel loads, before any user logs in.
/tr "C:\path\to\script.cmd": Specifies the Task Run action. This is the full path to the executable, batch file, or script that the task will execute.
/RL HIGHEST: Sets the Run Level to HIGHEST. This ensures the task runs with elevated privileges (equivalent to checking "Run with highest privileges" in the GUI), which is often required for system-level modifications.
Key Considerations
Administrative Rights: You must run the command prompt as Administrator to execute this command successfully; otherwise, you will receive an "Access is denied" error.
No Password Needed: When using /ru SYSTEM, you do not need to provide a password (/rp), as the System account does not use one.
Execution Context: Because this runs as SYSTEM at boot, it cannot interact with the user's desktop (no visible windows) and runs before user-specific environment variables are loaded.
Click Ignore to finish install.
Check port conflict:
Code: Select all
netstat -ano | findstr :9182Verify config file syntax if using --config.file (YAML) or collector flags — bad flags in service args cause immediate exit.
Check service binary path/args:
Code: Select all
sc qc windows_exporterCode: Select all
"C:\Program Files\windows_exporter\windows_exporter.exe" --config.file="C:\Program Files\windows_exporter\config.yml"
Ensure install run as Administrator (elevated cmd/powershell), not just admin user without elevation.WMI Performance Adapter (WmiApSrv) is disabled. Enable it:
Code: Select all
sc config wmiapsrv start= demand
sc start wmiapsrv
Code: Select all
sc config windows_exporter depend= wmiapsrv
net start windows_exporter
Code: Select all
sc qc wmiapsrvCode: Select all
http://localhost:9182/metricsCode: Select all
http://<hostname_or_ip>:9182/metrics
Code: Select all
netstat -ano | findstr :9182Code: Select all
netsh advfirewall firewall add rule name="windows_exporter" dir=in action=allow protocol=TCP localport=9182Code: Select all
collectors:
enabled: cpu,logical_disk,net,os,service,system,memory,tcp,textfile,process,diskdrive,thermalzone,time,cpu_info,scheduled_task,pagefile
collector:
service:
include: windows_exporter
log:
level: warn
Debugs:
Code: Select all
C:\Windows\System32>sc start windows_exporter
[SC] StartService FAILED 1068:
The dependency service or group failed to start.
Code: Select all
sc query wmiapsrvCode: Select all
sc config wmiapsrv start= demandCode: Select all
sc start windows_exporterCode: Select all
winmgmt /resyncperf
lodctr /r
Code: Select all
sc config wmiapsrv start= autoCode: Select all
sc config wmiapsrv start= delayed-autoCode: Select all
sc start wmiapsrvCode: Select all
sc qc wmiapsrvOpen Task Scheduler and select Create Basic Task.
Name the task and set the trigger to When the computer starts.
For the action, select Start a program.
In the "Program/script" field, enter cmd.exe.
In the "Add arguments" field, enter /k your_command_here (or /c to close the window after running).
Note: Check Run with highest privileges if the command requires admin rights.
Command Line Alternative: You can also create a scheduled task programmatically using:
Code: Select all
schtasks.exe /create /tn "StartupTask" /ru SYSTEM /Sc ONSTART /tr "C:\path\to\script.cmd" /RL HIGHEST/create: Instructs schtasks.exe to create a new scheduled task.
/tn "StartupTask": Specifies the Task Name. This is the unique identifier for the task in the Task Scheduler library.
/ru SYSTEM: Defines the Run User account. Setting this to SYSTEM executes the task under the local System account, which has higher privileges than standard administrator accounts and is used by the OS itself.
/Sc ONSTART: Sets the Schedule type to ONSTART. This triggers the task immediately after the Windows kernel loads, before any user logs in.
/tr "C:\path\to\script.cmd": Specifies the Task Run action. This is the full path to the executable, batch file, or script that the task will execute.
/RL HIGHEST: Sets the Run Level to HIGHEST. This ensures the task runs with elevated privileges (equivalent to checking "Run with highest privileges" in the GUI), which is often required for system-level modifications.
Key Considerations
Administrative Rights: You must run the command prompt as Administrator to execute this command successfully; otherwise, you will receive an "Access is denied" error.
No Password Needed: When using /ru SYSTEM, you do not need to provide a password (/rp), as the System account does not use one.
Execution Context: Because this runs as SYSTEM at boot, it cannot interact with the user's desktop (no visible windows) and runs before user-specific environment variables are loaded.