Hi,
If I understand your question , you want add confirmation for each NIC modification.
Below a Example :
$inet1=Get-DnsClient | Get-DnsClientServerAddress | where{$_.ServerAddresses -contains "192.168.0.245" -or $_.ServerAddresses -contains "192.168.0.207"}
foreach($nic in $inet1){
$interfaceAlias = $nic.InterfaceAlias
$yes = Read-Host -Prompt "type Yes to confirm the modification on $interfaceAlias :"
if($yes -eq "Yes"){
Set-DnsClientServerAddress -InterfaceIndex $nic.InterfaceIndex -ServerAddresses ("192.168.0.245","192.168.0.114")
}
}
Please don't forget to mark helpful reply as answer