Tinus EngOps Wiki

Logo

OpsaC - Operating as PowerShell code

Links

Home

IT-Wiki

PowerShell Blog

PowerShell Index

PowerShell Search

Additional Websites

View my GitHub Profile

View my GitHub Gists

View my Codeberg Page

View my Photo Website

Powershell Ping

published: December 23, 2014 author: Tinu tags: Netzwerk - Ping categories: PowerShell


Test-Connection: Ping in PowerShell senden

Mit Test-Connection wird ein Ping abgesetzt; die Firewall muss auf den Zielcomputern nicht geöffnet werden.

$serverlist = @("Server1","Server2","Server3")
$serverlist | % {
    if (Test-Connection -ComputerName $($_) -Quiet){
        "Host available""
    }
    else{
        "Host not available"
    }
}

← Previous Post ◇ [ Top ] ◇ Copyright © 2024 by tinuwalther ◇ [ Blog ] ◇ Next Post →