Hello Guys…!!!

Here is the simple script to clear the WINS entry from multiple servers with powershell script.

$servers=gc C:\ServerList.txt
foreach($server in $servers){
$adapters=Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE -ComputerName $server
foreach($adapter in $adapters){
Write-Host "=======Before Making the WINS NULL=========" -ForegroundColor White
Write-Host $adapter.Description,$adapter.WINSPrimaryServer,$adapter.WINSSecondaryServer
$adapter.SetWINSServer("","")
}
}
Advertisement