лирическое отступление - cmd был придуман когда windows | deskstop | windows stations не было даже в проекте вот неумеет он ничо
во vbscript - кто умеет превести на js пожта
Код:

Dim objShell: Set objShell = WScript.CreateObject("WScript.Shell")
Dim objShellApplication: Set objShellApplication = WScript.CreateObject("shell.application")
Dim objWindows : set objWindows = objShellApplication.Windows()
Wscript.echo objWindows.Count
Dim objWindow
For cnt = 0 To objWindows.Count-1
set objWindow = objWindows.item(cnt)
LocationName = objWindow.LocationName
' NOTE double quotes
if InStr(LocationName,"Personalization") > 0 then
Wscript.echo "Closing " & objWindow.HWND
objWindow.Quit()
end if
Next
Set objShell = Nothing
Set objWindows = Nothing
Set objShellApplication = Nothing