Please see - https://www.sysnative.com/forums/windows-tips-and-tricks/3319-wmi-windows-management-instrumentation-batch-scripts.html