Share via


RemoveByBadLeases method of the PS_DhcpServerv4Lease class

Deletes the specified IPv4 address lease record from the DHCP server.

Syntax

uint32 RemoveByBadLeases(
  [in]  boolean           PassThru,
  [in]  string            ComputerName,
  [in]  boolean           BadLeases,
  [in]  string            ScopeId,
  [out] DhcpServerv4Lease cmdletOutput[]
);

Parameters

PassThru [in]

If this parameter is specified, the cmdlet return the PowerShell objects which are deleted.

ComputerName [in]

DNS name or IP address of the target computer running the DHCP server service.

BadLeases [in]

If specified, all bad IP address leases are deleted. An IP address lease which is declined by a client because of an IP address conflict are marked as Bad by the server.

ScopeId [in]

Scope identifier (in IPv4 address format) from which the IP address leases are to be deleted.

cmdletOutput [out]

An embedded instance of the DhcpServerv4Lease class.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\DHCP
MOF
DhcpServerPsProvider.mof
DLL
DhcpServerPsProvider.dll

See also

PS_DhcpServerv4Lease