none
VMM2012 - Unable to delete static ip address pool

    Question

  • I am trying to remove a IP pool but I am getting an error saying I need to return all the allocated IP addresses. I am not aware I assigned this to anthing but to be safe I deleted all my VM's!! I have checked to see if there are any to release and there arn't

    I am aware there is a cmdlt to tell what has the allocation can someone give me an example of it. I cannot find it in the docs or on bing!!

    thanks


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com
    Thursday, September 15, 2011 3:52 PM

Answers

  • $ip = get-scipaddress -IPAddress "172.16.2.1"

    $ip | revoke-scipaddress

     


    posting is provided "AS IS" with no warranties, and confers no rights. User assumes all
    • Marked as answer by Robbie_Roberts Sunday, September 18, 2011 5:19 PM
    Thursday, September 15, 2011 9:30 PM

All replies

  • From powershell cli, do $ip = get-scipaddress and see if it returns any allocated ip addresses. If it does, you can return them by calling Revoke-SCIPAddress on those IPaddresses. Do make sure these IP addresses are not getting used by any of your vms or load balancers before calling revoke though.

     

    HTH


    posting is provided "AS IS" with no warranties, and confers no rights. User assumes all
    Thursday, September 15, 2011 5:24 PM
  • nothing returned


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com
    Thursday, September 15, 2011 5:31 PM
  • I did just get-scipaddress and got the below. it seems one of the cluster host has it for some reason..


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com
    Thursday, September 15, 2011 5:35 PM
  • how can I revoke it, I get the below error (VMM 2012) thanks


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com
    Thursday, September 15, 2011 5:50 PM
  • Did you deploy OS on this host via VMM and chose static IP for the host network adapter? In that case are you sure you want to revoke this IP address? Note that revoking will just mark the IP address in VMM as available, it will not change the physical host network adapter configuration.

    If you do want to revoke this address do:

    $ip = get-scipaddress

    $ip | revoke-scipaddress

     


    posting is provided "AS IS" with no warranties, and confers no rights. User assumes all
    Thursday, September 15, 2011 8:43 PM
  • I am sure this host should not have this IP, sorry to ask so many questions, but in you example how do i know it is revoking the right IP and not them all. I expected to specify the IP.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. http:\\robbieroberts.wordpress.com
    • Proposed as answer by NNguyen14 Friday, March 14, 2014 5:14 PM
    Thursday, September 15, 2011 9:06 PM
  • $ip = get-scipaddress -IPAddress "172.16.2.1"

    $ip | revoke-scipaddress

     


    posting is provided "AS IS" with no warranties, and confers no rights. User assumes all
    • Marked as answer by Robbie_Roberts Sunday, September 18, 2011 5:19 PM
    Thursday, September 15, 2011 9:30 PM
  • Hi, the following script revokes all IP addresses in one subnet.

    $IPAddressPool = Get-SCStaticIPAddressPool -IPv4 -Subnet "10.92.21.0/24"

    $IPAddress = Get-SCIPAddress -StaticIPAddressPool $IPAddressPool -Assigned

    For ($i=1; $i -le 254; $i++)
    {
     Revoke-SCIPAddress -AllocatedIPAddress $IPAddress[$i] 
    }

    The subnet must be modified for your special needs.

    • Proposed as answer by Tullkas Thursday, July 10, 2014 2:14 PM
    Wednesday, February 15, 2012 1:43 PM
  • $IPAddressPool = Get-SCStaticIPAddressPool -IPv4 -Subnet "10.0.0.0/8"
    $IPAddress = Get-SCIPAddress -StaticIPAddressPool $IPAddressPool -Assigned
    ForEach ($ip in $IPAddress) {Revoke-SCIPAddress -AllocatedIPAddress $ip}

    • Proposed as answer by AndrewSteele Wednesday, August 20, 2014 9:02 PM
    Monday, July 9, 2012 3:38 PM
  • $IPAddressPool = Get-SCStaticIPAddressPool -IPv4 -Subnet "10.0.0.0/8"
    $IPAddress = Get-SCIPAddress -StaticIPAddressPool $IPAddressPool -Assigned
    ForEach ($ip in $IPAddress) {Revoke-SCIPAddress -AllocatedIPAddress $ip}

    THANK YOU!

    This worked perfectly (after I modified it to my subnet, of course)


    -Rajeev rajdude.com

    Tuesday, December 20, 2016 3:15 AM