Powershell to set new DNS Server for DHCP Reservations

I have IP reservations in my DHCP server for some clients. In this reservations I set an special DNS server for special name resolution. But now I have to change this IP because the DNS service was moved to a new server with new IP address.
I'm ltry to write a script which will change the DNS entry in all my reservation.

Solution:
I create a CSV file with all IP addresses which should be changed to the new DNS server (easy export from DHCP Server).
The column with the IP addreses in the CSV file needs a heading called "IP" and save the CSV in UTF-8 format with Delimiter ";" (even if we don't need it here).

Script to change the settings with log file

# new IP auf DNS server 
$NewDNS = '192.168.100.100'

# import csv file with all IPs
$IPs = Import-Csv -Path "C:\data\reservations.csv" -Delimiter ";" -Encoding "UTF8"

# write a log file
Start-Transcript -Path "C:\data\Set_New_DHCP_Settings.log"

# loop through all imported IP addresses
foreach ($IP in $IPs){

    # change the OptionId 6 (DNS server) for the IPs
    Write-Host "IP:" $IP.IP "Type:" $IP.Type "- Set new DNS server:" $NewDNS
    Set-DhcpServerv4OptionValue -ReservedIP $IP.IP -OptionId 6 -Value $NewDNS -Verbose
    
}

#Stop log file writing
Stop-Transcript 


If you need to change another DHCP Option you can find all OptionIDs here:
iana.org: DHCP and BOOTP Parameters

Block downloading and installing "Malicious Software Removal Tool" via Update

I'm looking for a methode to block "Malicious Software Removal Tool" updates from being downloaded and installed when doing Windows Update?

Solution:
You can set the following registry key to prevent downloading and installing MRT at windows update process.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MRT]
"DontOfferThroughWUAU"=dword:00000001


You can download and install the MRT manually without problems but via Microsoft Update or WSUS Update the patch will not downloaded.
“Das einzig sichere System müsste ausgeschaltet, in einem versiegelten und von Stahlbeton ummantelten Raum und von bewaffneten Schutztruppen umstellt sein.”
Gene Spafford (Sicherheitsexperte)