Retrieve Windows Boot Time Script

Here’s a small batch script to get the Windows 7 Boot time shown in milliseconds.

@echo off
FOR /F "Tokens=4" %%a IN (‘%windir%\system32\wevtutil.exe qe Microsoft-Windows-Diagnostics-Performance/Operational /rd:true /f:Text /c:1 /q:"*[System[(EventID = 100)]]"  /e:Events ^| FIND "Duration"’) DO SET BTIME=%%a
ECHO Boot Time is : %BTIME%

2011-05-19 02h39_00

Inspiration for this script came from the article Monitor System Startup Performance in Windows 7 written by Sean Wheeler for WindowsITPro.

2 Replies to “Retrieve Windows Boot Time Script”

  1. Okay I see. qe is the command and converting the curled quotes into regular quotes fixed the script.

Leave a Reply