$strService = Read-Host -Prompt "Bitte Service angeben"
$strFile = Read-Host -Prompt "Bitte Source-Datei angeben"
$strFile = Get-Content $strFile
foreach ($strLine in $strFile)
{
if (Get-Service $strService -ComputerName $strLine -ErrorAction SilentlyContinue)
{
Write-Host "$strLine = SQL Server"
}
else
{
Write-Host "$strLine ist kein SQL Server"
}
}
|