Wednesday , August 12 2020

Adding DNS Servers in All DHCP Scopes using PowerShell

To Get all Scopes – Open PowerShell – Run as Administrator


To Check DNS Servers Option 006

Get-DhcpServerv4Scope | Get-DhcpServerv4OptionValue | Where-Object {$_.OptionID -like 6} | FT Value


To Check – Whatif

Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer,,, –Whatif

To Apply

Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer,,,

To Check if its Applied or Not

Get-DhcpServerv4Scope | Get-DhcpServerv4OptionValue | Where-Object {$_.OptionID -like 6} | FT Value

You can see 006 DNS Servers Updated for all scopes


About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Check Also

OAuth and Microsoft Graph on Exchange on-premises with Hybrid Modern Authentication

Hybrid Modern Authentication (HMA) for Exchange On-Premises is being there for while which has a …

Leave a Reply

Your email address will not be published.