Find services running under credentials domain administrator account

Post date: Jul 17, 2013 8:23:52 AM

On many servers services are running under the domain administrator account.

To find out which services they are i wrote a little script. It checks all domain computers running Windows Server

$servers = get-qadcomputer | where { $_.OSName -match "Server"} | sort Name

foreach ($server in $servers) {

$hostname = $server.name

#Write-Host $hostname

if (Test-Connection -ComputerName $hostname -BufferSize 16 -Count 1 -ea 0 -quiet)

{

Write-Host $hostname -ForegroundColor blue

gwmi win32_service -computer $hostname | where {$_.StartName -eq "domain\administrator"} | select name

}

}