Remove-IpamDhcpConfigurationEvent
Remove-IpamDhcpConfigurationEvent
Removes configuration events for DHCP servers from the IPAM database.
Syntax
Parameter Set: RemoveDhcpConfigurationEvent0
Remove-IpamDhcpConfigurationEvent -EndDate <DateTime> [-AsJob] [-CimSession <CimSession[]> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-IpamDhcpConfigurationEvent cmdlet removes configuration events for Dynamic Host Configuration Protocol (DHCP) servers from the IP Address Management (IPAM) database. The cmdlet permanently deletes configuration events through the specified end date. The end date uses the time zone of the IPAM server.
Use the Get-IpamDhcpConfigurationEvent cmdlet to view configuration events from the IPAM database.
Do not specify the current date as the end date. The IPAM server collects the configuration events from DHCP servers as part of the next data gathering task, and, therefore, specifying the current date does not result in permanently deleting events from the current day.
The cmdlet does not delete the configuration events from the DHCP servers themselves.
Parameters
-AsJob
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CimSession<CimSession[]>
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Aliases |
Session |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EndDate<DateTime>
Specifies the end date as a DateTime object. The cmdlet removes events through this date from the IPAM database. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date
.
Do not specify the current date.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ThrottleLimit<Int32>
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
IpamDhcpConfigurationEvent
Represents a DHCP server configuration event in IPAM.
Examples
Example 1: Remove events through the previous day
This example removes all configuration events through the previous day.
The first command creates a DateTime object by using the Get-Date cmdlet, and then stores it in the $Today variable. By default, Get-Date creates the current date. For more information about Get-Date and DateTime objects, type Get-Help Get-Date
.
The second command removes configuration events from the IPAM database through the previous day. The command subtracts one day from the DateTime object stored in the $Today variable, and then specifies that value for the EndDate parameter.
PS C:\> $Today = Get-DatePS C:\>Remove-IpamConfigurationEvent -EndDate $Today.AddDays(-1)