$ser = Get-Content C:\Users\su-skumar\Desktop\servers.txt
ForEach ($one in $ser){
Test-NetConnection -ComputerName $one -CommonTCPPort RDP |
Select-Object -Property ComputerName, RemotePort, PingSucceeded, TcpTestSucceeded |
Out-File -FilePath 'C:\Temp\TNCResults.txt' -Append
}
Get-Content -Path 'C:\Temp\TNCResults.txt'
No comments:
Post a Comment