How to run commands for dhcp server mgmt

Muhammad Hussain 201 Reputation points
2020-08-11T16:04:35.117+00:00

How and where to run commands for dhcp mgmt?
When i run this command "Get-DhcpServerv4Scope" this is giving me an error on powershell that co.mand is not correct.
I want to perform the below article activity.
Server is 2008r2

https://www.azure365pro.com/adding-dns-servers-in-all-dhcp-scopes-using-powershell/

Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,039 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Jon Alfred Smith 541 Reputation points
    2020-08-11T16:56:28.517+00:00

    You will not be able to get the PowerShell DHCP module to work on Windows 2008 R2. Requires higher version, at least Windows 2012 or better 2012 R2. Use netsh instead.

    https://social.technet.microsoft.com/Forums/azure/en-US/edcd3cad-b7cb-4674-b24f-9838308024b3/windows-2008-r2-dhcp-module?forum=winserverManagement

    0 comments No comments

  2. Muhammad Hussain 201 Reputation points
    2020-08-12T04:24:36.463+00:00

    Then How can i run the commands given in this article or any other commands you please suggest to change the Dns IPs on all dhcp scopes 2008 r2?

    0 comments No comments

  3. Gloria Gu 3,896 Reputation points
    2020-08-12T06:08:04.817+00:00

    Hi,

    In regards to your issue, here're my suggestions:

    You can use 'netsh' CMD command to migrate DHCP. But still please remember to check the specific configuration such options after migration on the new server. I’ve tested in my environment and it successed.

    The migration steps:
    (1) Backup old DHCP server

    17164-2.png
    (2) Create a new txt file under C:\backup

    (3) Run CMD command 'netsh dhcp server export C:\backup.txt all''

    17165-3.png
    (4) Deploy the new DHCP server and authorize

    (5) Run CMD command 'netsh dhcp server import C:\backup.txt all'

    17065-4.png
    (6) Check the configuration

    For more details, you can refer to the following link;
    https://brycematheson.io/how-to-migrate-dhcp-from-windows-server-2008-to-2012-2016/

    If my answer is helpful to you, please remember to mark them as answer. Thank you!

    Best regards,
    Gloria

    0 comments No comments

  4. Muhammad Hussain 201 Reputation points
    2020-08-12T07:36:27.207+00:00

    But we don't want to migrate currently, currently we only want to change the dns IP's on all scopes in server 2008r2.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.