none
How to remove all failover scopes using powershell? RRS feed

  • Question

  • how to create a single-line (or so) powersehll command line to remove all failover scopes?

    PS C:\Windows\system32> Get-DhcpServerv4Failover | ft name,scopeid -A

    name                                ScopeId
    ----                                -------
    srv0007-srv0008 {10.122.191.0, 10.122.190.0, 10.122.53.0, 10.122.52.0...}

    How can I get all scope Ids and put into a Remove-DhcpServerv4Failover?

    PS: The secondary server is dead and even using the -force a error stating lack of communication (duh!) ocurred, so i´m guessing this is not a problem

    Friday, September 25, 2015 11:02 AM

Answers

  • Hi KayZerSoze,

    According to your description, you want to remove the failover relationship between two DHCP servers, and the secondary DHCP server has broken down.

    In addition to use powershell command to remove the failover relationship, we may use DHCP console to do this. In the DHCP console, right click IPv4, then click properties, it the failover properties, you may select the relationship name and click delete. Then we may promoted to confirm the deletion, and we may see the scopes associated with the failover relationship.

    We may use the above method to see if it could achieve your goal.

    You may click the following link to read the detailed information about how to remove failover relationship:

    https://technet.microsoft.com/en-us/library/dn338986.aspx

    Best Regards,

    Anne He


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, September 30, 2015 3:14 AM
    Moderator

All replies

  • Hi KayZerSoze,

    According to your description, you want to remove the failover relationship between two DHCP servers, and the secondary DHCP server has broken down.

    In addition to use powershell command to remove the failover relationship, we may use DHCP console to do this. In the DHCP console, right click IPv4, then click properties, it the failover properties, you may select the relationship name and click delete. Then we may promoted to confirm the deletion, and we may see the scopes associated with the failover relationship.

    We may use the above method to see if it could achieve your goal.

    You may click the following link to read the detailed information about how to remove failover relationship:

    https://technet.microsoft.com/en-us/library/dn338986.aspx

    Best Regards,

    Anne He


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, September 30, 2015 3:14 AM
    Moderator
  • Hi KayZerSoze,

    As Anne has already explianed nicely that you can use the GUI or Remove- Cmdlet directly to remove the scopename.

    No need pass the scopeIDs one by one, you just need to refer to the name.

    Its like this:

    Get- | Remove-

    Incase you don't want to remove specific scodeIDs, then it will be a different approach.


    Regards,

    Satyajit

    Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    Wednesday, September 30, 2015 4:44 AM
  • Hi KayZerSoze,

    According to your description, you want to remove the failover relationship between two DHCP servers, and the secondary DHCP server has broken down.

    In addition to use powershell command to remove the failover relationship, we may use DHCP console to do this. In the DHCP console, right click IPv4, then click properties, it the failover properties, you may select the relationship name and click delete. Then we may promoted to confirm the deletion, and we may see the scopes associated with the failover relationship.

    We may use the above method to see if it could achieve your goal.

    You may click the following link to read the detailed information about how to remove failover relationship:

    https://technet.microsoft.com/en-us/library/dn338986.aspx

    Best Regards,

    Anne He


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Hi  Anne,

      I just managed to delete the fail over relationship now my hot standby server is fixed and i can bring online so do i have to delete scopes manually and then re create?

    As 

      


    • Edited by AUSSUPPORT Monday, November 11, 2019 8:53 AM
    Monday, November 11, 2019 8:52 AM