Network DNS not working due to InterfaceMetric on Ethernet smaller then VPN

#Get Metric
Get-NetIPInterface | Select-Object -Property InterfaceAlias, InterfaceMetric | Sort-Object -Property InterfaceMetric
 
#Fix Metrix 
Get-NetIPInterface | Where-Object {$_.InterfaceAlias -like "Ethernet*"} | Set-NetIPInterface -InterfaceMetric 35

Proactive Remmeidation

$metrics = Get-NetIPInterface | Where-Object {$_.InterfaceAlias -like "Ethernet*"} | Select-Object InterfaceMetric


foreach($metric in $metrics)
 {
	
		if( $metric.InterfaceMetric -ne 35){
		Write-Host "Fixing"
		exit 1
	}
	 
	
}

 
 	Write-Host "Nothing"
    #Don't do Anything 
    exit 0
 

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...