2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PowerShellですべてのエクセルプロセスを終了させる

Posted at

すべてのExcelプロセスを終了させるpowershellスクリプトです。

大量のエクセルファイルを開いたり閉じたりすると,エクセルプロセスが残り重くなるので,適切な感覚で下記スクリプトを組み込むとエクセルプロセスを強制終了させることができます。

Stop-Excelprocess.ps1
# Stop All Excel process
Get-Process -Name EXCEL* | Stop-Process

# 全てのプロセスが終了するまで待機
#   -gt : > 
while ((Get-Process -Name EXCEL*).count -gt 0)
{
    Start-Sleep -m 200
}

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?