[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...

 

[PowerShell]Windows服务开启、重启、关闭

上一篇:[Windows]远程管理服务WinRM远程管理Windows服务器 Invalid use of command line. Type "winrm -?" for help.


下一篇:Windows密码安全性测试