I
ItsMe-Roger
Hi All
1. when i use the below syntax i am getting the output but if a server has two host records i can see only one record in the output not two records.
Resolve-DNSName server01 -Type ALL
2. I have servers list in txt file in the below format
Server01
Server02
Below syntax works for me but i want to export the output to txt file i.e servers which are resolving in a separate txt file and servers which are not resolving in a separate text file. how can do it.
$ServersList = Get-Content "C:\ServerList.txt"
ForEach ($Computer In $ServersList)
{
Write-Host "Retrieving DNS information..."
Resolve-DNSName $Computer
Write-Host
}
3. In the same way for ping also
$ServersList = Get-Content "C:\ServerList.txt"
ForEach ($Computer In $ServersList)
{
Write-Host "Executing PING..."
Test-NetConnection $Computer
Write-Host
}
Continue reading...
1. when i use the below syntax i am getting the output but if a server has two host records i can see only one record in the output not two records.
Resolve-DNSName server01 -Type ALL
2. I have servers list in txt file in the below format
Server01
Server02
Below syntax works for me but i want to export the output to txt file i.e servers which are resolving in a separate txt file and servers which are not resolving in a separate text file. how can do it.
$ServersList = Get-Content "C:\ServerList.txt"
ForEach ($Computer In $ServersList)
{
Write-Host "Retrieving DNS information..."
Resolve-DNSName $Computer
Write-Host
}
3. In the same way for ping also
$ServersList = Get-Content "C:\ServerList.txt"
ForEach ($Computer In $ServersList)
{
Write-Host "Executing PING..."
Test-NetConnection $Computer
Write-Host
}
Continue reading...