title: How to Set DNS Suffix and Registration using PowerShell?
body: <p>I am writing a script to automatically set the "Register this connection's addresses in DNS" &amp; "Use this connection's DNS suffix in DNS" in Advanced TCP/IP Settings on a fresh out of the box device. </p>
  
  <p>I've been successful clicking through the Network Settings prior to running the script in order for those settings to be set. I want to avoid doing that at all cost.</p>
  
  <p>This is my code.</p>
  
  <pre><code>Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6
  Get-NetAdapter -name "*" | Set-DnsClient -UseSuffixWhenRegistering $True
  </code></pre>
  
  <p>When I run this code in powershell only the "Register this connection's addresses in DNS" box is checked not the "Use this connection's DNS suffix in DNS" box.</p>