Powershell Ping1 파워쉘 Ping ( Test-Connection ) ping을 사용해서 대상 컴퓨터의 작동여부를 알 수 있고, 결과는 문자열을 반환합니다 Test-Connection에 -Count 1 -Quiet를 사용하면 결과를 True, False를 반환하기 때문에스크립트내에서 사용하는데 편리합니다 사용예$computers = '127.0.0.1','128.1.2.3','127.0.0.2'ForEach($com in $computers){ Write-Host $com if(Test-Connection -ComputerName $com -Count 1 -Quiet){ Write-Host "Ping 성공" }else{ Write-Host "Ping 실패" -BackgroundColor Red } Write-Ho.. 2024. 4. 5. 이전 1 다음