Powershell script to set MS DHCP Server's DNS Credential. It will create a new user, make it a member of DNSUpdateProxy, and set it as the DHCP server's DNS credential. This must be run on a server with AD installed. If the DHCP server is on another IP, you can specify with "-DHCPServer".
Syntax:
Will specify the password in cleartext.
Set-DNSUpdateCredential -CleartextPassword "Password"
Will specify the password as a secure string.
Set-DNSUpdateCredential -SecurePassword [SecureString]
Will generate a password.
Set-DNSUpdateCredential -GeneratePassword
Will not return anything, success or fail.
Set-DNSUpdateCredential -GeneratePassword -Silent
Returns cleartext password.
Set-DNSUpdateCredential -GeneratePassword -OutputCleartextPassword
Returns password as a secure string.
Set-DNSUpdateCredential -GeneratePassword -OutputSecurePassword
Will specify the DHCP server IP. This example generates a password, but it also works when providing one.
Set-DNSUpdateCredential -GeneratePassword -DHCPServer "IP/hostname"