[PowerShell]Windows服务开启、重启、关闭
# 获取服务信息 PS C:\Users\Administrator> Get-Service win* Status Name DisplayName ------ ---- ----------- Stopped WinHttpAutoProx... WinHTTP Web Proxy Auto-Discovery Se... Running Winmgmt Windows Management Instrumentation Running WinRM Windows Remote Management (WS-Manag...
# 停止服务 PS C:\Users\Administrator> Stop-Service WinRM PS C:\Users\Administrator> Get-Service WinRM Status Name DisplayName ------ ---- ----------- Stopped WinRM Windows Remote Management (WS-Manag...
# 重启服务 PS C:\Users\Administrator> Restart-Service WinRM PS C:\Users\Administrator> Get-Service WinRM Status Name DisplayName ------ ---- ----------- Running WinRM Windows Remote Management (WS-Manag...