Since you posted the question in the COM forum, here is the COM way to do it...



$objShell=CreateObject("Shell.Application")
$objWindows=$objShell.Windows
For $Index = 0 to $objWindows.Count-1
    $objWindows.Item($Index).Quit
Next

[Smile]