Showing posts with label DHCP. Show all posts
Showing posts with label DHCP. Show all posts

Sunday, May 12, 2013

Export and Import a readable DHCP scope

Export:
Readable:
netsh dhcp server \\SERVERNAME dump all > filename.txt
Unreadable:
netsh dhcp server \\SERVERNAME export d:\filename all

Full Export with policies (2012) using PS with Administrator Rights
Export-DhcpServer -ComputerName SERVERNAME -File "D:\filename.xml" -Force

Import:
Full Import with policies (2012) using PS with Administrator Rights
Import DhcpServer -ComputerName SERVERNAME -File "D:\filename.xml" -Force

for New 2003 server format
netsh exec filename.txt

for 2000 server format
netsh dhcp server import filename.txt all

Authorize:
1. Activate
2. Authorized from currently authorized DHCP server

Wednesday, May 18, 2011

Old DHCP Servers appear in the list of Authorized servers

Symptoms:
1. You may see the old server’s name still listed when you view DHCP Authorized servers
2. You may get the following error: "There is no such object on the server” when tried to unauthorized

Solution:
Remove the objects from Active Directory using ADSIEDIT:
1. Start Adsiedit.msc.
2. Open the configuration Container.
3. Expand Services.
4. Expand Net Services.
5. On the right hand side, find a record named CN=DHCPRoot
6. Right Click the CN=DhcpRoot entry and then click Properties
7. Highlight DhcpServers Attribute and click Edit
8. Highlight the entry with the old Domain name and click Remove from DHCPServers Attribute. Click OK to close DHCPServers editor’s screen
9. Once deleted the DHCPServers value will be “not set"
10. Save the change by clicking OK and close Adsiedit.
11. Restart the DHCP server service
12. run the following command: “Netsh DHCP show server” to check
13. If the servers are still listed, run the command “netsh DHCP delete server ServerFQDN ServerIPAddress”