#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