Skip to content

Instantly share code, notes, and snippets.

@nichollsc81
Created April 28, 2021 07:51
Show Gist options
  • Save nichollsc81/5bb616a92ac5fe484dce3cab2d1d7294 to your computer and use it in GitHub Desktop.
Save nichollsc81/5bb616a92ac5fe484dce3cab2d1d7294 to your computer and use it in GitHub Desktop.
# A random session is chosen
$AllServices = Get-Service
$Body = foreach($Service in $AllServices) {
[PSCustomObject]@{
ServiceName = $Service.ServiceName
ServiceStatus = $Service.Status
Startup = $Service.StartupType
Requires = $Services.RequiredServices
}
}
$Body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment