Get-IpamDhcpConfigurationEvent
Get-IpamDhcpConfigurationEvent
Gets configuration events for DHCP servers from the IPAM database.
構文
Parameter Set: Query (cdxml)
Get-IpamDhcpConfigurationEvent [-AsJob] [-CimSession <CimSession[]> ] [-EndDate <DateTime> ] [-ServerName <String[]> ] [-StartDate <DateTime> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
詳細説明
The Get-IpamDhcpConfigurationEvent cmdlet gets configuration events for Dynamic Host Configuration Protocol (DHCP) servers from the IP Address Management (IPAM) database. You can specify fully qualified domain names (FQDNs) of DHCP servers, a start date, and an end date. If you do not specify a DHCP server, the cmdlet gets configuration events for all servers.
Use the Remove-IpamDhcpConfigurationEvent cmdlet to remove events from the database.
If you do not specify a start date, the cmdlet uses the date of the first IPAM configuration event in the database. If you do not specify an end date, the cmdlet uses the date of the last IPAM configuration event. All dates use the time zone of the IPAM server.
If there are more than 10,000 results for a command, the cmdlet returns only 10,000. The cmdlet warns that this is a partial result.
パラメーター
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-EndDate<DateTime>
Specifies the end date as a DateTime object. The cmdlet gets events through this date from the IPAM database. To obtain a DateTime object, use the Get-Date cmdlet and specify the date in DD/MM/YYYY format. For more information, type Get-Help Get-Date
.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ServerName<String[]>
Specifies an array of FQDNs of DHCP servers.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-StartDate<DateTime>
Specifies the start date as a DateTime object. The cmdlet gets events beginning with this date. To obtain a DateTime object, use the Get-Date cmdlet and specify the date in DD/MM/YYYY format.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
IpamDhcpConfigurationEvent
Represents a DHCP server configuration event in IPAM.
例
Example 1: Get events for all servers for a date range
This example gets the configuration events for all DHCP servers, and then saves them as a .csv file.
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 stores a new DateTime object in the $StartTime variable. That date is seven days prior to the date stored in the $Today variable.
The third command gets configuration events between the start date, stored in the $StartDate variable, and the end date, stored in the $Today variable, for all DHCP servers. The command passes the events to the Export-Csv cmdlet by using the pipeline operator. That cmdlet saves the results as a .csv file. For more information about this cmdlet, type Get-Help Export-Csv
.
PS C:\> $Today = Get-Date
PS C:\>$StartDate= $Today.AddDays(-7)
PS C:\>Get-IpamDhcpConfigurationEvent -EndDate $Today -StartDate $StartDate | Export-Csv "C:\IpamEvents.csv"
Example 2: Get events for specified servers for a date range
This example gets the configuration events for two DHCP servers, and then saves them as a .csv file.
The first command creates a DateTime object by using the Get-Date cmdlet, and then stores it in the $Today variable.
The second command stores a new DateTime object in the $StartTime variable. That date is seven days prior to the date stored in the $Today variable.
The third command gets configuration events between the start date, stored in the $StartDate variable, and the end date, stored in the $Today variable. The command specifies the FQDNs of two DHCP servers. The command passes the events to the Export-Csv cmdlet by using the pipeline operator. That cmdlet saves the results as a .csv file.
PS C:\> $Today = Get-Date
PS C:\> $StartDate= $Today.AddDays(-7)
PS C:\> Get-IpamConfigurationEvent -EndDate $Today -ServerName "dhcp01.contoso.com","dhcp02.contoso.com" -StartDate $StartDate | Export-Csv "C:\IpamFilteredEvents.csv"