I am using the windows server of the 2016 version running the DHCP instance on it, for testing, I am trying to add, and delete an active lease using the PowerShell command it worked fine for the first trial but after the leases expiry time, I am unable to add a new lease with the new lease expiry time.
The output of the command showing the previous lease added with the state as expired
S C:\Users\Administrator> Get-DhcpServerv4Lease -IPAddress 14.0.0.2
IPAddress ScopeId ClientId HostName AddressState LeaseExpiryTime
14.0.0.2 14.0.0.0 42-2e-7c-b0-a7-c8 Expired 8/4/2022 1:38:13 AM
Trying to add new lease with a new expiry time
PS C:\Users\Administrator>
S C:\Users\Administrator> Add-DhcpServerv4Lease -IPAddress 14.0.0.2 -ScopeId 14.0.0.0 -ClientId 42-2b-7d-b0-a7-c8 -LeaseExpiryTime "2022-08-09 23:38:13" -HostName "phone2.test.com"
Add-DhcpServerv4Lease : Failed to add IP address lease for 14.0.0.2 on server WIN-8S0KSAF0ULF.
At line:1 char:1
- Add-DhcpServerv4Lease -IPAddress 14.0.0.2 -ScopeId 14.0.0.0 -ClientId ...
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ResourceExists: (14.0.0.2:root/Microsoft/...cpServerv4Lease) [Add-DhcpServerv4Lease], CimException
- FullyQualifiedErrorId : DHCP 20014,Add-DhcpServerv4Lease
PS C:\Users\Administrator>
PS C:\Users\Administrator> Get-DhcpServerv4Lease -ScopeId 14.0.0.0 -BadLeases
PS C:\Users\Administrator>
PS C:\Users\Administrator> Get-DhcpServerv4Lease -ScopeId 14.0.0.0 -ClientId "42-2e-7c-b0-a7-c8"
IPAddress ScopeId ClientId HostName AddressState LeaseExpiryTime
14.0.0.2 14.0.0.0 42-2e-7c-b0-a7-c8 Expired 8/4/2022 1:38:13 AM
For other scopes it is working fine, I can delete the scope and recreate it but want to know what is the mistake or condition that DHCP server went into it
Thanks in Advance