找到 463 篇文章 相关 PowerShell
18K+ 浏览量
要获取远程计算机上所有正在运行的进程,您需要在 Get-process cmdlet 中使用 –ComputerName 参数,使用 WMI 类 Win32_Process 或使用 Get-CimInstance cmdlet。使用 –ComputerName 参数Get-process -ComputerName Test-PC要连接多台计算机,请使用逗号 (,) 分隔的计算机名称。Get-process -ComputerName Test-PC, Win2k8使用 WMI 对象获取多台远程计算机上的进程。Get-WmiObject Win32_Process -ComputerName Test-PC, Win2k8使用 Get-CimInstance cmdlet 获取远程计算机上的进程。Get-CimInstance Win32_Process -ComputerName Test-PC, Win2k8
1K+ 浏览量
您还可以使用 Get-CimInstance 命令和与 WMI 对象使用的相同的类 Win32_Process 来显示计算机上正在运行的进程。命令Get-CimInstance Win32_Process输出ProcessId Name HandleCount WorkingSetSize VirtualSize --------- ---- ----------- -------------- ----------- 0 System Idle Process 0 8192 8192 4 System 6387 970752 5177344 96 Registry 0 76951552 173195264 568 smss.exe 53 495616 2203359674368 800 csrss.exe 883 4653056 2203416825856 896 csrss.exe 817 5349376 2203449389056 920 wininit.exe 156 4886528 2203387420672 956 winlogon.exe 264 9486336 2203423092736 8 services.exe 838 10129408 2203391979520 684 lsass.exe 1870 20848640 2203418796032
3K+ 浏览量
要使用 WMI 对象获取正在运行的进程,您需要使用类 Win32_Process。使用此方法,您将获得比 Get-Process 命令更多的属性。命令Get-WmiObject –Class Win32_Process输出GENUS : 2 __CLASS : Win32_Process __SUPERCLASS : CIM_Process __DYNASTY : CIM_ManagedSystemElement __RELPATH : Win32_Process.Handle="0" __PROPERTY_COUNT : 45 __DERIVATION ... 阅读更多
5K+ 浏览量
要使用 PowerShell 获取服务器上正在运行的进程的线程,您需要使用 Get-Process 命令。当您运行此命令时,将以表格形式显示默认字段(ProcessName、Id、SI、CPU(s)、WS(K)、PM(K)、NPM(K)、Handles)。命令Get-process输出Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName ------- ------ ----- ----- ------ -- -- ----------- 502 27 9796 19340 1.72 6320 1 AcroRd32 640 52 112028 ... 阅读更多
3K+ 浏览量
要使用 PowerShell 启动多个服务,我们需要在服务之间使用逗号 (,)。例如,Start-Service -Name Spooler,AdobeARMservice -VerboseGet-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
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
2K+ 浏览量
要在 PowerShell 中停止具有依赖服务的服务,使用 -Force 参数。首先,我们将检查特定服务的依赖服务是什么,要获取它们,使用 -DependentService 参数。示例例如,WMI 服务(名称:Winmgmt)有多个依赖服务。Get-Service -Name Winmgmt -DependentServices输出tatus Name DisplayName ------ ---- ----------- Running UALSVC User Access Logging Service Stopped smstsmgr ConfigMgr Task Sequence Agent Stopped SepLpsService Symantec Endpoint Protection Local ... Stopped NcaSvc ... 阅读更多
3K+ 浏览量
要启动特定的 Windows 服务,您需要使用 Start-Service 命令。示例Start-Service -Name Spooler上面的命令将启动名为 spooler 的服务。要检查服务是否已启动,请使用 Get-Service –Name Spooler 命令。输出Status Name DisplayName ------ ---- ----------- Running 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 ... 阅读更多
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 语言编程
C++
C#
MongoDB
MySQL
Javascript
PHP