Cannot run Import-DhcpServer or Backup-DhcpServer in Server 2012
-
Friday, November 16, 2012 5:42 PM
Hi Folks,
We are moving to 2012 DC's. Things are going well except for importing the DHCP config from a 2008 non R2 server. I'm following the advice from this blog, although I am not importing to a failover configuration, just from a single server to another server.
I have run the Export-DhcpServer cmdlet successfully on the 2012 server to generate the dhcpexp.xml from the remote 2008 server. However, when I try to run the Import-DhcpServer cmdlet to import the configuration:
Import-DhcpServer –ComputerName mydc.mydomain.org -Leases –File C:\export\dhcpexp.xml -BackupPath C:\dhcp\backup\ -Verbose
it fails with the following error:
backup-dhcpserver : Failed to back up the database on server mydc.mydomain.org to c:\dhcpbackup.
At line:1 char:1
+ backup-dhcpserver -computername mydc.mydomain.org -path c:\dhcpbackup
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (mydc.mydomain.org:root/Microsoft/...P/PS_DhcpServer) [Backup-DhcpS
erver], CimException
+ FullyQualifiedErrorId : WIN32 5,Backup-DhcpServerI next tried not specifying the -BackupPath parameter to Import-DhcpServer, but it prompted me, so it is apparently mandatory. I then tried running the Backup-DhcpServer cmdlet, but it also fails with exactly the same error message. I have tried a variety of different paths, and fiddling with permissions on the the specified folders with no success.
Can anyone lend me a hand so I can get this wrapped up? Thanks alot,
ianc
All Replies
-
Sunday, November 18, 2012 5:34 AM
Did you tried with the netsh command ? Seem more easy to move that way.
Check the wiki article http://social.technet.microsoft.com/wiki/contents/articles/8484.how-to-easily-change-a-dhcp-s-scope-subnet.aspx I did some time ago.
It show how to change the scoop, but it's the same if you migrate, you migrate and import in your other server.
MCP | MCTS 70-236: Exchange Server 2007, Configuring
Want to follow me ?
| Blog:
http://www.jabea.net | http://blogs.technet.com/b/wikininjas/ -
Monday, November 19, 2012 6:39 AM
I know you may have already tried this, but I have to ask: Did you run the shell as Administrator?
Or have you tried to back it up to a folder in your profile?
I assume both DCs (old and new) are in the same domain.
Ace Fekay
MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/This post is provided AS-IS with no warranties or guarantees and confers no rights.
- Marked As Answer by ianc3 Monday, November 19, 2012 9:54 PM
-
Monday, November 19, 2012 9:53 PM
[quote]I know you may have already tried this, but I have to ask: Did you run the shell as Administrator?[/quote]
BINGO! I've never had to run a powershell console as admin before, but I guess there's a first time for everything. Thanks for the (excellent) answer to my (stupid) question,
ianc
-
Tuesday, November 20, 2012 1:07 AM
A question is only stupid if you don't ask. :-)
Glad to hear it was an easy fix!
Ace Fekay
MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/This post is provided AS-IS with no warranties or guarantees and confers no rights.

