Get-CimInstance 参考 模块: CimCmdlets 从CIM 服务器获取类的 CIM 实例。 语法 PowerShell Get-CimInstance[-ClassName] <String> [-ComputerName <String[]>] [-KeyOnly] [-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow] [-Filter <String>] [-Property <...
This example retrieves all the CIM instances that start with the letter P of a class named Win32_Process using the Filter parameter. PowerShell Copy Get-CimInstance -ClassName Win32_Process -Filter "Name like 'P%'"Example 5: Get the CIM instances with only key properties filled ...
This example retrieves all the CIM instances that start with the letter P of a class named Win32_Process using the Filter parameter.PowerShell Kopēt Get-CimInstance -ClassName Win32_Process -Filter "Name like 'P%'"Example 5: Get the CIM instances with only key properties filled in...
This example retrieves all the CIM instances that start with the letter P of a class named Win32_Process using the Filter parameter.PowerShell Copy Get-CimInstance -ClassName Win32_Process -Filter "Name like 'P%'"Example 5: Get the CIM instances with only key properties filled in...
PS C:\>Get-CimInstance-ClassNameWin32_Process-Filter"Name like 'p%'" Example 5: Get the CIM instances with only key properties filled in This set of commands creates a new CIM instance in memory for a class namedWin32_Processwith the key property@{ "Handle"=0 }and stores it in a va...
PS C:\>Get-CimInstance-ClassNameWin32_Process-Filter"Name like 'p%'" Example 5: Get the CIM instances with only key properties filled in This set of commands creates a new CIM instance in memory for a class namedWin32_Processwith the key property@{ "Handle"=0 }and stores it in a va...
Get-CimInstance是推荐使用的命令,因为它基于更现代的Windows Management Infrastructure (MI) API。与Get-WmiObject相比,Get-CimInstance提供了更好的远程管理支持和性能。 例如,如果你想要获取系统上所有进程的列表(类似于WMIC process list),可以使用: powershellCopy Code Get-CimInstance -ClassName Win32_Process 2....
To get the owner of the process, I use theGetOwnermethod from the Win32_Process class that I retrieve when I query for instances of Notepad. The first thing I do is useGet-CimInstanceto retrieve instances of Notepad: Get-CimInstance Win32_Process -Filter "name = 'notepad.exe'" ...
Get-WmiObject Win32_Service -Filter "name='WinRM'" 展开表 类型: String Position: Named 默认值: None 必需: False 接受管道输入: False 接受通配符: False-Impersonation指定要使用的模拟级别。 此参数的可接受值为: 0:默认。 读取默认模拟级别的本地注册表。 默认值通常设置为 模拟。 1:匿名。 隐藏调...
Get-cimInstance win32_service -computer hqdbsp18 -filter "startname like '%localsystem%' and name like '%App%'"| Select Name,startmode,state,startname,systemname |Format-Table -AutoSize Get-wmiobject win32_service -computer hqdbsp18 -filter "startname like '%localsys...