파워쉘(Powershell)/예제2 파워쉘-원격컴퓨터에 설치되어 있는 프로그램 리스트 정보 32비트, 64비트로 작성된 프로그램이 설치되어 있기 때문에, 설치된 프로그램 리스트를 갖고 오려면 레지스트리 두 군데서 정보를 갖고 와야 합니다 HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" $array = @() $UninstallKeys=”SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall”, "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall" $computerName = "Computer1" for.. 2024. 4. 8. 파워쉘 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 다음