Services inspector

Does anyone know if the services inspector for Windows allows you to see dependencies, e.g., if servicea is dependent on serviceb, I could see that using the inspector.

@jbruns2017 I don’t see a Property of the <service> inspector.
You might be able to see them with a registry query:

Example, for BITS service:

q: value "DependOnService" of key  (service name of service "bits" as string) of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services" of native registry
A: RpcSs%00%00

image

I looked at bits and see 3 services it depends on, so I wonder if there are other registry keys.

Here is a Powershell way to get what a service is dependent on and what services are dependent on it.

…find the services that must be running before I can start the service?
$name = ‘BrokerInfrastructure’
$query = (‘Associators of {Win32_Service.Name=’ + [char]34+$name+[char]34+’} Where AssocClass=Win32_DependentService Role=Dependent’)
Get-WmiObject -Query $query -Namespace “root\cimv2” | format-list Name, DisplayName

.find the services that require the service to be running before they can start?
$name = ‘BrokerInfrastructure’
$query = (‘Associators of {Win32_Service.Name=’ + [char]34+$name+[char]34+’} Where AssocClass=Win32_DependentService Role=Antecedent’)
Get-WmiObject -Query $query -Namespace “root\cimv2” | format-list Name, DisplayName

I see the registry key you used is a multi-string type.

image

Maybe another option using @brolly33 approach

Q: display names of services (substrings separated by "%00" of (preceding texts of last "%00%00" of (values "DependOnService" of key  (service name of service "BrokerInfrastructure" as string) of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services" of native registry as string)) as string as trimmed string)
A: RPC Endpoint Mapper
A: DCOM Server Process Launcher
A: Remote Procedure Call (RPC)
T: 200.476 ms
I: plural string
4 Likes

Generally, the service inspectors have a lot of room for improvement to be desired! I already have one RFE (the Windows inspector doesn’t differentiate between different “Automatic” start-ups - Auto, Auto-Delayed, Auto-Triggered) and had submitted a few complaints on Linux/Unix as those are significantly more deficient (it cannot even capture “state” on Linux, so you have to look up processes as workaround; it cannot capture “start up” at all which does exist on Linux OS and I haven’t been able to find a direct relevance workaround at all; etc).Even the service-side Linux/Unix Compliance checks coming from HCL require you to run actions that output to file which then checks read back all which would be a LOT simpler if only there were working inspectors that are even “on-par” with Windows…

1 Like

@ageorgiev

Thank you for the IDEA.
I also think the Windows services inspector should differentiate the different subtypes of Start Type.

@SLB
I love that you took the registry workaround and converted it back into services objects. That was slick.

It’s a little tricky, but I think we can modularize that relevance, so it’s more like <property> of <object>

q: (services(( substrings separated by "%00" of preceding texts of last "%00%00" of (it as string) of  values "DependOnService" of item 0 of it) of (keys of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services" of native registry, it) whose (name of item 0 of it as string as lowercase = service name of item 1 of it as string as lowercase) as string)) of service "BrokerInfrastructure"
A: "RpcEptMapper" "RPC Endpoint Mapper" "Running"
A: "DcomLaunch" "DCOM Server Process Launcher" "Running"
A: "RpcSs" "Remote Procedure Call (RPC)" "Running"
3 Likes

@brolly33, sure: BFP-I-103.

I may actually need to submit RFEs for start type of service & state of service for Linux.

1 Like

@jbruns2017 I hope the workaround relevance helped you for your immediate needs.

To the longer term enhancement, could I ask your favor in two small tasks?

Could I ask you to go vote for the Idea that @ageorgiev opened that requests this enhancement
Could you also please add your “use case” into the comments in the Idea?

It really helps the development team make their decisions on what to work on next when they can see how the enhancement will serve your IT needs and they can see how many votes an idea has.

1 Like

I voted it up and added comments.

2 Likes

Created the RFE for the inspectors on Unix/Linux as well now: BFP-I-207.

2 Likes