Warning: Undefined variable $archive_page_slug in /home/xs372180/pnpk.net/public_html/wp-content/plugins/kgarchives/kgarchives.php on line 17
Warning: Undefined variable $archive_page_slug in /home/xs372180/pnpk.net/public_html/wp-content/plugins/kgarchives/kgarchives.php on line 17
PowerShellでサービス一覧を取得する場合には
Get-Service
と入力します。
Get-Service自体のヘルプを参照する場合には
Get-Service -?
と入力します。
停止しているサービスの一覧を取得する場合には
Get-Service | Where-Object {$_.status -eq "stopped"}
逆に稼働しているサービスの一覧を取得するには
Get-Service | Where-Object {$_.status -eq "running"}
と入力します。
サービスを開始させる場合には
Start-Service -Name サービス名
サービスを停止させる場合には
Stop-Service -Name サービス名
サービスを一時停止させる場合には
Suspend-Service -Name サービス名
と入力します。
サービスが稼働しているのかどうか判定する場合には
こんな感じです。