找到 2042 篇文章,关于 Microsoft 技术

PowerShell 中 Get-Process 命令有什么用?

Chirag Nagrekar
更新于 2020年1月22日 10:34:31

568 次浏览

Get-Process 是一个 PowerShell cmdlet,用于获取 Windows 终端中所有正在运行的后台进程的实例。任务管理器“进程”选项卡中显示的任何进程,其所有线程都可通过 Get-Process 命令在 PowerShell 控制台中显示。

如何在 PowerShell 中启动依赖服务?

Chirag Nagrekar
更新于 2020年1月22日 10:33:58

675 次浏览

在 PowerShell 中启动依赖服务与使用 –Force 参数停止依赖服务不同,因为没有 –Force 参数可用。您需要先获取依赖服务,然后启动它们。例如:Get-Service -Name Winmgmt -DependentServices | Start-Service -Verbose

如何使用 PowerShell 启动多个 Windows 服务?

Chirag Nagrekar
更新于 2020年1月22日 10:33:25

3K+ 次浏览

要使用 PowerShell 启动多个服务,需要在服务之间使用逗号 (,)。例如:Start-Service -Name Spooler,AdobeARMservice -Verbose 或 Get-Service -Name Spooler,AdobeARMservice | Start-Service -Verbose 要启动显示名称的服务,例如:Start-Service -Name “Print Spooler”, “Work Folder” -Verbose 或 Get-Service -Name “Print Spooler”, “Work Folder” | Start-Service -Verbose

如何在 PowerShell 中使用显示名称启动 Windows 服务?

Chirag Nagrekar
更新于 2020年1月22日 10:32:28

738 次浏览

要使用显示名称停止服务,请使用参数 –DisplayName。例如,PS C:\> Start-Service -DisplayName "Print Spooler" -Verbose VERBOSE: Performing the operation "Start-Service" on target "Print Spooler (Spooler)"。您也可以使用显示名称启动服务,例如:PS C:\> Get-Service -DisplayName "Print Spooler" | Start-Service -Verbose

如何在 PowerShell 中停止服务及其依赖服务?

Chirag Nagrekar
更新于 2020年1月22日 10:26:00

2K+ 次浏览

要在 PowerShell 中停止具有依赖服务的服务,使用 -Force 参数。首先,我们将检查特定服务的依赖服务,为此使用 -DependentService 参数。例如,WMI 服务 (名称:Winmgmt) 具有多个依赖服务。Get-Service -Name Winmgmt -DependentServices 输出状态 名称 显示名称 ------ ---- ----------- 运行 UALSVC 用户访问日志服务 停止 smstsmgr ConfigMgr 任务序列代理 停止 SepLpsService Symantec Endpoint Protection 本地 ... 停止 NcaSvc ... 阅读更多

如何在 PowerShell 中启动 Windows 服务?

Chirag Nagrekar
更新于 2020年1月22日 10:23:19

3K+ 次浏览

要启动特定的 Windows 服务,需要使用 Start-Service 命令。例如:Start-Service -Name Spooler 上述命令将启动名为 spooler 的服务。要检查服务是否已启动,请使用 Get-Service –Name Spooler 命令。输出状态 名称 显示名称 ------ ---- ----------- 运行 spooler Print Spooler 此命令不会显示命令进度。要检查命令进度,请使用 –Verbose 参数。PS C:\> Start-Service -Name Spooler -Verbose VERBOSE: Performing the operation "Start-Service" on target "Print Spooler (Spooler)"。您也可以使用:Get-Service -Name Spooler | Start-Service -Verbose PS C:\> Get-Service -Name Spooler | Start-Service -Verbose VERBOSE: Performing the operation "Start-Service" on target "Print Spooler ... 阅读更多

如何在 PowerShell 中停止服务及其依赖服务?

Chirag Nagrekar
更新于 2020年1月22日 10:20:18

545 次浏览

可以使用名称或显示名称通过在它们之间提供命令 (,) 来停止多个服务。使用名称和显示名称:Stop-Service -Name Spooler, W32Time -Verbose Stop-Service -DisplayName "Print Spooler","Windows Time" -Verbose

如何使用 PowerShell 停止多个服务?

Chirag Nagrekar
更新于 2020年1月22日 10:15:43

3K+ 次浏览

可以使用名称或显示名称通过在它们之间提供命令 (,) 来停止多个服务。使用名称和显示名称:Stop-Service -Name Spooler, W32Time -Verbose Stop-Service -DisplayName "Print Spooler","Windows Time" –Verbose

如何在 PowerShell 中停止显示名称的服务?

Chirag Nagrekar
更新于 2020年1月22日 10:14:43

577 次浏览

与 -Name 参数类似,当您添加 -DisplayName 参数后跟服务显示名称时,它将停止具有 DisplayName 的服务。Stop-Service -DisplayName 'Print Spooler' -Verbose 或 Get-Service -DisplayName "Print Spooler" | Stop-Service -Verbose

如何在 PowerShell 中停止 Windows 服务?

Chirag Nagrekar
更新于 2020年1月22日 08:07:43

22K+ 次浏览

要在 PowerShell 中停止特定服务,需要使用 Stop-Service 命令。语法 Stop-Service -Name ServiceName Stop-Service -DisplayName ServiceDisplayName 例如 Stop-Service -Name Spooler 要检查服务是否已停止,请键入 Get-Service -Name Spooler。输出状态 名称 显示名称 ------ ---- ----------- 停止 Spooler Print Spooler 您也可以使用 -Verbose 参数来检查命令进程。PS C:\Windows\system32> Stop-Service -Name spooler -Verbose VERBOSE: Performing the operation "Stop-Service" on target "Print Spooler (spooler)"。您也可以使用:Get-Service -Name Spooler | Stop-Service -Verbose 您也可以使用通配符 ... 阅读更多

广告
© . All rights reserved.