PowerShell

Restart-Computer

注意再起動(リモート可)

Restart-Computer -ComputerName <host> -Force

ローカル/リモートPCを再起動。-Waitで復帰まで待機できパッチ適用の自動化に便利。-Forceはセッション強制終了。

実行例

  • Restart-Computer -ComputerName srv01 -Wait -For PowerShell復帰を待って次の処理へ

書式

Restart-Computer [-ComputerName host] [-Force] [-Wait]

実行前の注意

-Forceは未保存作業を失わせる。

関連コマンド

圏外の現場でも同じ内容が引けます

このサイトの全コマンドと対処フローを、まるごと端末の中に。通信なしで検索できます。インストール無料、広告なし。

App Storeで無料インストール