Ah! That got me on the right road. I actually had to add the line
$newDNS = $DNS.Split(" ") | Where-Object {$_ -ne $removeAddress}
to the script since it was taking $DNS as just one string and not splitting it apart. Perfect! Thank you!
Ah! That got me on the right road. I actually had to add the line
$newDNS = $DNS.Split(" ") | Where-Object {$_ -ne $removeAddress}
to the script since it was taking $DNS as just one string and not splitting it apart. Perfect! Thank you!