There are PowerShell functions that can enumerate depending and required services. Stumbled over this when I was searching for a solution to the same problem: .DependentServices and .ServicesDependedOn
Here's a full script (adapted from the original/source):
# https://dkalemis.wordpress.com/2015/03/02/visualize-the-services-graph-of-your-windows-os/
# replace "DisplayName" with "Name" ore vice versa.
function List-DependentServices ($inputService, $inputPadding)
{
if ($inputService.DependentServices)
{
$padding = " " + $inputPadding
$output = $padding + "/\ is required by these services:"
$output
$padding = " " + $padding
foreach ($ds in $inputService.DependentServices)
{
$output = $padding + $ds.Name
$output
List-DependentServices $ds $padding
}
}
}
function List-ServicesDependedOn ($inputService, $inputPadding)
{
if ($inputService.ServicesDependedOn)
{
$padding = " " + $inputPadding
$output = $padding + "/ depends on these services:"
$output
$padding = " " + $padding
foreach ($rs in $inputService.ServicesDependedOn)
{
$output = $padding + $rs.Name
$output
List-ServicesDependedOn $rs $padding
}
}
}
$services = Get-Service
foreach ($service in $services)
{
$output = $service.Name
$output
List-DependentServices $service ""
List-ServicesDependedOn $service ""
}
And this can help to execute it (redirect output > toText.file)
powershell.exe "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '.\ServiceGraphRecursively.ps1'"
The original author went a step further and explains how to parse the text output from this script into an actual graph.