列出 Windows 中开机自动启动的服务

用 Get-Service 按 StartType 过滤,查看所有设为自动启动的服务。

Windows系统服务PowerShell低风险
运行 `Get-Service | Where-Object StartType -eq Automatic | Select-Object Name, DisplayName, Status`,即可列出所有开机自启的服务。

01命令

命令
$ Get-Service | Where-Object StartType -eq Automatic | Select-Object Name, DisplayName, Status

02作用说明

所有设为 Automatic 的服务都会在开机时启动,因此服务列表越来越长会拖慢开机速度。Get-Service 会为每个服务返回一个 ServiceController 对象,其 StartType 属性就是配置的启动方式;用 Where-Object 即可筛出 Automatic 的项。结合 Status 列还能看出它们当前是否真的在运行。

03风险

风险低风险
!注意: 这里显示的是配置而非运行状态——Automatic 的服务也可能处于停止状态,请同时查看 Status 列。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Get-Service
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Get-Service returns ServiceController objects for all services (no arguments = every service), which can be piped to Where-Object for filtering by properties such as Status.
  • ServiceController.StartType Property
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents the StartType property of ServiceController objects (the type returned by Get-Service) and the ServiceStartType enumeration values Automatic, Manual and Disabled.

最后验证: 2026-09-19 · 分类: 系统与设置

06相关方案