Why a working Title command in CMD.exe does not reflect in TASKLIST?

254 views Asked by At

SO is Windows 11. When I open a cmd window and then run the title command, I can see the window title changing in the window tab. But then when I run tasklist, I get N/A in window title property.

Here is the sequence of commands:

cmd.exe
title aaa
tasklist /v /fi "imagename eq cmd.exe" /fo list

cmd is run from the Windows search bar (does not matter really, I think).

result:

Image Name:   cmd.exe
PID:          24088
Session Name: Console
Session#:     1
Mem Usage:    6,244 K
Status:       Unknown
User Name:    AzureAD\XXXXXXXX
CPU Time:     0:00:00
Window Title: N/A

Below a picture. enter image description here

Does anyone knows why this is happening?.

I have tracked down this as a potential reason for a batch file failure using the TASKKILL command: TASKKILL /F /FI "WINDOWTITLE eq aaa" /IM cmd.exe

0

There are 0 answers