计算机服务的状态,显示服务状态

若要查看指定计算机上所有服务的状态,可以本地使用 Get-Service cmdlet。 对于远程系统,可以使用 Win32_Service WMI 类 。 如果还使用 Select-Object 来筛选 Status、Name 和 DisplayName 的结果,则输出格式将与 Get-Service 的输出格式几乎完全相同 :

PS C:\Users\maxsu> Get-CimInstance -ClassName Win32_Service | Select-Object -Property Status,Name,DisplayName

Status Name DisplayName

------ ---- -----------

OK AJRouter AllJoyn Router Service

OK ALG Application Layer Gateway Service

OK AppIDSvc Application Identity

OK Appinfo Application Information

OK Apple Mobile Device Service Apple Mobile Device Service

OK AppReadiness App Readiness

OK AppXSvc AppX Deployment Service (AppXSVC)

OK aspnet_state ASP.NET State Service

OK AtherosSvc AtherosSvc

OK AudioEndpointBuilder Windows Audio Endpoint Builder

OK Audiosrv Windows Audio

OK autotimesvc 手机网络时间

OK AxInstSV ActiveX Installer (AxInstSV)

OK BDESVC BitLocker Drive Encryption Service

OK BFE Base Filtering Engine

OK BITS Background Intelligent Transfer Service

OK BrokerInfrastructure Background Tasks Infrastructure Service

OK BTAGService 蓝牙音频网关服务

OK BthAvctpSvc AVCTP 服务

OK bthserv 蓝牙支持服务

OK camsvc 功能访问管理器服务

OK CDPSvc 连接设备平台服务

OK CertPropSvc Certificate Propagation

OK ClipSVC Client License Service (ClipSVC)

OK COMSysApp COM+ System Application

若要完整显示具有极长名称的临时服务的名称,可能需要使用具有 AutoSize 和 Wrap 参数的 Format-Table,用于优化列宽并允许较长名称换行而不是被截断 :

PS C:\Users\maxsu> Get-CimInstance -ClassName Win32_Service | Format-Table -Property Status,Name,DisplayName -AutoSize -Wrap

Status Name DisplayName

------ ---- -----------

OK AJRouter AllJoyn Router Service

OK ALG Application Layer Gateway Service

OK AppIDSvc Application Identity

OK Appinfo Application Information

OK Apple Mobile Device Service Apple Mobile Device Service

OK AppReadiness App Readiness

OK AppXSvc AppX Deployment Service (AppXSVC)

OK aspnet_state ASP.NET State Service

OK AtherosSvc AtherosSvc

OK AudioEndpointBuilder Windows Audio Endpoint Builder

OK Audiosrv Windows Audio

OK autotimesvc 手机网络时间

... ...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值