$ErrorActionPreference = 'SilentlyContinue'

$items = Get-Process EXCEL -ErrorAction SilentlyContinue | Where-Object { -not $_.MainWindowTitle }
foreach ($item in $items) {
    Write-Output ('stopping_hidden_excel=' + $item.Id)
    Stop-Process -Id $item.Id -Force
}
