PowerShell Gallery
This PowerShell module has two simple commands to that work with the registry to either get or set the primary DNS suffix of a computer.