Windowsサービス起動・停止

  1. サービス一覧取得
    ps> Get-Service | Format-Table -AutoSize
  2. 指定サービス情報取得
    ps> Get-Service <サービス名> | Format-Table -AutoSize
  3. サービス起動
    ps> Start-Service -Name <サービス名>
  4. サービス停止
    ps> Stop-Service -Name <サービス名>
  5. サービス再起動
    ps> Restart-Service -Name <サービス名>
  6. サービス一時停止
    ps> Suspend-Service -Name <サービス名>
  7. サービス再開
    ps> Resume-Service -Name <サービス名>
  8. サービス登録
    ps> Set-Service -Name <サービス名> -StartupType Manual
  9. サービス登録・ステータス設定
    ps> Set-Service -Name <サービス名> -Status Running
        状態:Stopped, Paused