Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
It is possible do this by using some like this answer (bat/+/C#), but not by using wmic, instead, this will generating an executable file and call/use it in your bat... interested?
wmic
? I don't think it's possible.Get-Process |where {$_.mainWindowTItle} |format-table id,name,mainwindowtitle –AutoSize