PowerShell · Administration

Computerliste auf Erreichbarkeit prüfen

Prüft Computer aus einer Textdatei per ICMP und erstellt einen Statusreport.

PowerShell
$computer = Get-Content '.\computer.txt' | Where-Object { $_.Trim() }
$report = foreach ($name in $computer) {
  [pscustomobject]@{
    Computer = $name
    Erreichbar = Test-Connection -ComputerName $name -Count 1 -Quiet -ErrorAction SilentlyContinue
  }
}
$report | Format-Table -AutoSize
PowerShellInventarPingNetzwerk
WA