none
Get DHCP info whether it was Leased or Reserved? RRS feed

  • Question

  • Hi guys,

    Is it possible to get info of an IP Address to know, whether the IP Address type was Leased, or Reserved?

    From Get-DHCPServerv4Reservation -IPAdress 10.1.0.100 it could be misleading as the output is being displayed like IP Address was reserved, eventhough it was just leased.

    I can see the differences when checked through dhcpmgmt.msc console, that IP Address 10.1.0.100 has a lease expiration time (which conforms that the IP Address was just leased to the client, not a Reservation).

    My goal is to run a cmdlet which can give me a result telling the specific IP Address was coming from Reservation, or Leased?

    Please let me know if this is possible with Powershell.

    Thank you in advanced!


    ---Pat

    Tuesday, February 20, 2018 5:08 PM

Answers

  • Hi,

    Please type the command “get-dhcpserverv4lease [-ScopeID]” within Powershell on the DHCP server, or you can recognize “Address Leases” on the DHCP console of the server as below.

    Refer to the exhibit, we could distinguish the leased and reserved client by the parameters “AddressState” and “LeaseExpiryTime”. Especially, DHCP Reservations have no lease expiry time. And it indicates that the Reservations never expire.      

    Refer to the following link:

    DHCP Server Cmdlets in Windows PowerShell

    https://technet.microsoft.com/es-es/library/jj590751(v=wps.630).aspx

    Best Regards,

    Frank


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, February 21, 2018 8:39 AM