edutech4schools Posted March 24, 2015 Posted March 24, 2015 I am trying and failing to move DHCP from 2008r2 to 2012r2 server. I am trying to run this power shell script from the 2012r2 server, replacing win2k8r2-dhcp.corp.contoso.com with the 2008r2 server details. Export-DhcpServer –ComputerName win2k8r2-dhcp.corp.contoso.com -Leases -File C:\export\dhcpexp.xml -verbose But I am getting this error - the term 'export-dhcpserver' is not recognized as the name of the cmdlet. Anyone got any advice.
mowgli82 Posted March 24, 2015 Posted March 24, 2015 (edited) not done it with powershell but here is the commands I use to export: netsh dhcp server \\ scope 192.168.1.0 dump> c:\dhcp.txt to import : netsh exec c:\dhcp.txt Edited March 24, 2015 by mowgli82
Michael Posted March 24, 2015 Posted March 24, 2015 I use the above command too, via an Admin Command Prompt.
edutech4schools Posted March 24, 2015 Author Posted March 24, 2015 Uninstalled DHCP role, re-installed and without needing to import again all scopes and leases are imported. Odd, but that's Windows for you. Cheers
edutech4schools Posted March 24, 2015 Author Posted March 24, 2015 While I am at it I would like to change the starting IP for the DHCP addresses. Currently our leases start at *.*.*.16 but I would like it to start at 20 or 25. How do I make this change without killing everything.
ADMaster Posted March 24, 2015 Posted March 24, 2015 You can just edit the properties of the scope via the dhcp MMC. If you have alot to change I use excel to concatenate the appropriate netsh commands, then copy and paste to elevated command prompt.
DavePa Posted March 24, 2015 Posted March 24, 2015 Probably not the right way to do it but I replicated the old server settings to the new server but without authorising the new scope. I then simply unauthorised the old and authorised the new and bingo - job done. Nobody had any problems whatsoever.
ADMaster Posted March 24, 2015 Posted March 24, 2015 Also don't forget to update the ip helper info on your router and wireless etc.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now