PowerShellでサービス一覧を表示する・Get-Service †Get-Serviceコマンドレットを使用することにより、Windowsサービス一覧を表示することができます。 Get-Serviceコマンドレット使用例 †以下にいくつかGet-Serviceコマンドレットの実行例を記します。 Get-Serviceコマンドレットを実行 †Get-Serviceコマンドレットを実行すると以下のように、Windowsサービス一覧が表示されます。 PS D:\> Get-Service Status Name DisplayName ------ ---- ----------- Stopped AJRouter AllJoyn Router Service Stopped ALG Application Layer Gateway Service Stopped AppIDSvc Application Identity Running Appinfo Application Information Stopped AppReadiness App Readiness Stopped AppXSvc AppX Deployment Service (AppXSVC) Running AudioEndpointBu... Windows Audio Endpoint Builder Running Audiosrv Windows Audio Stopped AxInstSV ActiveX Installer (AxInstSV) Stopped BcmBtRSupport Bluetooth Driver Management Service Stopped BDESVC BitLocker Drive Encryption Service Running BFE Base Filtering Engine Running BITS Background Intelligent Transfer Ser... Running BrokerInfrastru... Background Tasks Infrastructure Ser... Stopped Browser Computer Browser <省略> Runningのサービス一覧を表示 †PS D:\> Get-Service | Where-Object { $_.Status -eq "running" } Status Name DisplayName ------ ---- ----------- Running Appinfo Application Information Running AudioEndpointBu... Windows Audio Endpoint Builder Running Audiosrv Windows Audio Running BFE Base Filtering Engine Running BITS Background Intelligent Transfer Ser... Running BrokerInfrastru... Background Tasks Infrastructure Ser... Running BrYNSvc BrYNSvc Running bthserv Bluetooth Support Service <省略> PS D:\> Get-Service | % { if ($_.Status -eq "running") { $_ } } Status Name DisplayName ------ ---- ----------- Running Appinfo Application Information Running AudioEndpointBu... Windows Audio Endpoint Builder Running Audiosrv Windows Audio Running BFE Base Filtering Engine Running BITS Background Intelligent Transfer Ser... Running BrokerInfrastru... Background Tasks Infrastructure Ser... Running BrYNSvc BrYNSvc Running bthserv Bluetooth Support Service <省略> Stoppedのサービス一覧を表示 †PS D:\> Get-Service | Where-Object { $_.Status -eq "stopped" } Status Name DisplayName ------ ---- ----------- Stopped AJRouter AllJoyn Router Service Stopped ALG Application Layer Gateway Service Stopped AppIDSvc Application Identity Stopped AppReadiness App Readiness Stopped AppXSvc AppX Deployment Service (AppXSVC) Stopped AxInstSV ActiveX Installer (AxInstSV) <省略> PS D:\> Get-Service | % { if ($_.Status -eq "stopped") { $_ } } Status Name DisplayName ------ ---- ----------- Stopped AJRouter AllJoyn Router Service Stopped ALG Application Layer Gateway Service Stopped AppIDSvc Application Identity Stopped AppReadiness App Readiness Stopped AppXSvc AppX Deployment Service (AppXSVC) Stopped AxInstSV ActiveX Installer (AxInstSV) <省略> 以上、Windowsサービス一覧を表示するGet-Serviceコマンドレットの紹介でした。 |