「Shell.Application」はWindowsのシェル機能を利用できるCOMオブジェクトです。
URLに任意文字列を含むIEを終了させる
(Quit the IE with URL that contains specified string)
function quitIE()
{
PARAM([String]$urlKeyword)
$app = new-object -com Shell.Application
$app.Windows() | where{$_.Document.URL -match $urlKeyword} | foreach{$_.quit()}
}
quitIE "google"