Difference between revisions of "Windows DHCP"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 26: | Line 26: | ||
quit | quit | ||
" | nsupdate -k /etc/bind/rndc.key | " | nsupdate -k /etc/bind/rndc.key | ||
+ | ``` | ||
+ | |||
+ | # Get Server list | ||
+ | ``` | ||
+ | netsh dhcp show server | ||
+ | Get-DhcpServerInDC | ||
+ | ``` | ||
+ | |||
+ | run registerdns on a bunch of hosts | ||
+ | ``` | ||
+ | $cred = get-credential | ||
+ | |||
+ | foreach($line in Get-Content .\hosts.txt | ForEach-Object{($_ -split "\s+")[3]}) { invoke-command $line -ScriptBlock {ipconfig /registerdns} -credential $cred } | ||
``` | ``` |
Latest revision as of 00:46, 11 June 2021
Dynamic DNS
https://access.redhat.com/solutions/3905181
echo "server 10.207.39.2 update add $HOST.urdomain1.com 3600 IN A xxx.xxx.xxx.xxx send update add xxx.xxx.xxx.xxx.in-addr.arpa 3600 IN PTR $HOST.urdomain1.com send quit " | nsupdate -k /etc/bind/rndc.key End Example @leifnel leifnel commented on Jan 19, 2018 • @gstanden, still wrong. The reverse record has the octets in reverse order echo "server 10.207.39.2 update add $HOST.urdomain1.com 3600 IN A a.b.c.d send update add d.c.b.a.in-addr.arpa 3600 IN PTR $HOST.urdomain1.com send quit " | nsupdate -k /etc/bind/rndc.key
Get Server list
netsh dhcp show server Get-DhcpServerInDC
run registerdns on a bunch of hosts
$cred = get-credential foreach($line in Get-Content .\hosts.txt | ForEach-Object{($_ -split "\s+")[3]}) { invoke-command $line -ScriptBlock {ipconfig /registerdns} -credential $cred }