#Requires -Version 5.1 -PSEdition Desktop
<#
.Synopsis
Reports on a given list of AD servers if they have the VeeamDistributionSvc running and it's startType. This is in response to Veeam KB4288, https://www.veeam.com/kb4288
.Notes
Version: 1.0
Author: Jim Jones, @k00laidIT
Modified Date: 3/13/2022
.EXAMPLE
.\Get-VeeamDistroSvc.ps1
#>
$svcName = "VeeamDistributionSvc"
$servers = Get-ADComputer -filter * | where {$_.Name -like "*veeam*" -or $_.Name -like "*backup*" -or $_.Name -like "*whatever*"}
[System.Collections.ArrayList]$mySvcInfo = @()
foreach ($server in $servers) {
$svcstatus = get-service -ComputerName $server.name -Name $svcName | select name, status, startType
$quickInfo = New-Object psobject -Property @{
server = $server.name
service = $svcstatus.Name
status = $svcstatus.status
startType = $svcstatus.startType
}
$mySvcInfo += $quickInfo
}
$mySvcInfo | select server, service, status, startType