February 2019
Intermediate to advanced
626 pages
15h 51m
English
The ASSOCIATORS OF query may be used for any given object path; for example, using the preceding object path results in the following command:
Get-CimInstance -Query "ASSOCIATORS OF {Win32_Process.Handle=$PID}"
This query will return objects from three different classes: Win32_LogonSession, Win32_ComputerSystem, and CIM_DataFile. The classes returned are shown in the following example:
PS> Get-CimInstance -Query "ASSOCIATORS OF {Win32_Process.Handle=$PID}" |>> Select-Object CimClass -UniqueCimClass--------root/cimv2:Win32_ComputerSystemroot/cimv2:Win32_LogonSessionroot/cimv2:CIM_DataFile
The query can be refined to filter a specific resulting class; an example is as follows:
Get-CimInstance -Query "ASSOCIATORS OF {Win32_Process.Handle=$PID} ...Read now
Unlock full access