Here is a cool way to use the WMI Commandline Utility (WMIC.exe) to retrieve the remaining windows rearm count from the WMI database using a simple batch file. Copy and paste the following script into notepad and save it with a ".bat" or ".cmd" filename extension. For example, you can save it as "RearmCount.bat". Code: @echo off setlocal enableextensions for /f "usebackq tokens=2 delims==" %%n in (`"%SystemRoot%\System32\wbem\WMIC.exe" /namespace:\\root\cimv2 path SoftwareLicensingService get RemainingWindowsReArmCount /format:list`) do set r=%%n if %r% == 1 (set s=) else (set s=s) echo.You have %r% rearm%s% remaining. pause Cheers!