ResultRole

PS C:\Windows\system32> $query = "associators of {win32_service.name='lanmanworkstation'} where resultrole=dependent"
PS C:\Windows\system32> gwmi -query $query | fl *


Name                    : Browser
Status                  : OK
ExitCode                : 0
DesktopInteract         : False
ErrorControl            : Normal
PathName                : C:\Windows\System32\svchost.exe -k netsvcs
ServiceType             : Share Process
StartMode               : Manual
__GENUS                 : 2
__CLASS                 : Win32_Service
__SUPERCLASS            : Win32_BaseService
__DYNASTY               : CIM_ManagedSystemElement
__RELPATH               : Win32_Service.Name="Browser"
__PROPERTY_COUNT        : 25
__DERIVATION            : {Win32_BaseService, CIM_Service, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER                : My_PC
__NAMESPACE             : root\cimv2
__PATH                  : \\My_PC\root\cimv2:Win32_Service.Name="Browser"
AcceptPause             : False
AcceptStop              : True
Caption                 : Computer Browser
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Maintains an updated list of computers on the network and supplies this list to computers designated as browsers. If this service is stopped, this list
                          art.
DisplayName             : Computer Browser
InstallDate             :
ProcessId               : 1076
ServiceSpecificExitCode : 0
Started                 : True
StartName               : LocalSystem
State                   : Running
SystemCreationClassName : Win32_ComputerSystem
SystemName              : My_PC
TagId                   : 0
WaitHint                : 0
Scope                   : System.Management.ManagementScope
Path                    : \\My_PC\root\cimv2:Win32_Service.Name="Browser"
Options                 : System.Management.ObjectGetOptions
ClassPath               : \\My_PC\root\cimv2:Win32_Service
Properties              : {AcceptPause, AcceptStop, Caption, CheckPoint...}
SystemProperties        : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers              : {dynamic, Locale, provider, UUID}
Site                    :
Container               :

Name                    : Netlogon
Status                  : OK
ExitCode                : 0
DesktopInteract         : False
ErrorControl            : Normal
PathName                : C:\Windows\system32\lsass.exe
ServiceType             : Share Process
StartMode               : Auto
__GENUS                 : 2
__CLASS                 : Win32_Service
__SUPERCLASS            : Win32_BaseService
__DYNASTY               : CIM_ManagedSystemElement
__RELPATH               : Win32_Service.Name="Netlogon"
__PROPERTY_COUNT        : 25
__DERIVATION            : {Win32_BaseService, CIM_Service, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER                : My_PC
__NAMESPACE             : root\cimv2
__PATH                  : \\My_PC\root\cimv2:Win32_Service.Name="Netlogon"
AcceptPause             : True
AcceptStop              : True
Caption                 : Netlogon
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Maintains a secure channel between this computer and the domain controller for authenticating users and services. If this service is stopped, the compu
                          bled, any services that explicitly depend on it will fail to start.
DisplayName             : Netlogon
InstallDate             :
ProcessId               : 660
ServiceSpecificExitCode : 0
Started                 : True
StartName               : LocalSystem
State                   : Running
SystemCreationClassName : Win32_ComputerSystem
SystemName              : My_PC
TagId                   : 0
WaitHint                : 0
Scope                   : System.Management.ManagementScope
Path                    : \\My_PC\root\cimv2:Win32_Service.Name="Netlogon"
Options                 : System.Management.ObjectGetOptions
ClassPath               : \\My_PC\root\cimv2:Win32_Service
Properties              : {AcceptPause, AcceptStop, Caption, CheckPoint...}
SystemProperties        : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers              : {dynamic, Locale, provider, UUID}
Site                    :
Container               :

Name                    : SessionEnv
Status                  : OK
ExitCode                : 0
DesktopInteract         : False
ErrorControl            : Normal
PathName                : C:\Windows\System32\svchost.exe -k netsvcs
ServiceType             : Share Process
StartMode               : Manual
__GENUS                 : 2
__CLASS                 : Win32_Service
__SUPERCLASS            : Win32_BaseService
__DYNASTY               : CIM_ManagedSystemElement
__RELPATH               : Win32_Service.Name="SessionEnv"
__PROPERTY_COUNT        : 25
__DERIVATION            : {Win32_BaseService, CIM_Service, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER                : My_PC
__NAMESPACE             : root\cimv2
__PATH                  : \\My_PC\root\cimv2:Win32_Service.Name="SessionEnv"
AcceptPause             : False
AcceptStop              : True
Caption                 : Remote Desktop Configuration
CheckPoint              : 0
CreationClassName       : Win32_Service
Description             : Remote Desktop Configuration service (RDCS) is responsible for all Remote Desktop Services and Remote Desktop related configuration and session mainten
DisplayName             : Remote Desktop Configuration
InstallDate             :
ProcessId               : 1076
ServiceSpecificExitCode : 0
Started                 : True
StartName               : localSystem
State                   : Running
SystemCreationClassName : Win32_ComputerSystem
SystemName              : My_PC
TagId                   : 0
WaitHint                : 0
Scope                   : System.Management.ManagementScope
Path                    : \\My_PC\root\cimv2:Win32_Service.Name="SessionEnv"
Options                 : System.Management.ObjectGetOptions
ClassPath               : \\My_PC\root\cimv2:Win32_Service
Properties              : {AcceptPause, AcceptStop, Caption, CheckPoint...}
SystemProperties        : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers              : {dynamic, Locale, provider, UUID}
Site                    :
Container               :



PS C:\Windows\system32> gwmi -query $query


ExitCode  : 0
Name      : Browser
ProcessId : 1076
StartMode : Manual
State     : Running
Status    : OK

ExitCode  : 0
Name      : Netlogon
ProcessId : 660
StartMode : Auto
State     : Running
Status    : OK

ExitCode  : 0
Name      : SessionEnv
ProcessId : 1076
StartMode : Manual
State     : Running
Status    : OK



No comments:

Post a Comment