Find-IpamFreeAddress

Find-IpamFreeAddress

Gets one or more free IP addresses from a range of IP addresses in IPAM.

構文

Parameter Set: Metric
Find-IpamFreeAddress [-InputObject] <CimInstance> [[-NumAddress] <UInt32> ] [-AsJob] [-CimSession <CimSession[]> ] [-TestReachability] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Find-IpamFreeAddress cmdlet gets one or more free IP addresses from a range of IP addresses in IP Address Management (IPAM). If you specify the NumAddress parameter, the cmdlet returns the requested number of free IPv4 addresses. If you do not specify the NumAddress parameter, the cmdlet returns a single free IP address. The maximum number of free IP addresses that the cmdlet returns is 1024. The cmdlet does not include exclusion address ranges, reservations, and assigned addresses among the free IP addresses. If the requested number of free IP addresses could not be found, a warning occurs. If you specify the TestReachability parameter, IPAM returns a ping status and a DNS record status for each of the IP address that it returns.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance>

Specifies the range from which to get one or more free IP addresses.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-NumAddress<UInt32>

Specifies the number of free addresses to get. A warning occurs if the number of free addresses returned is less than the number requested. If you do not specify this parameter, the cmdlet returns a single free address.

エイリアス

なし

必須?

false

位置は?

3

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-TestReachability

Indicates that the cmdlet tests the reachability of the IP addresses.

エイリアス

なし

必須?

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)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • IpamFreeAddress

    Represents an unallocated IP address in IPAM server. Along with the IP address, the object also contains flags that specify whether IPAM server was able to ping the IP address and whether IPAM server found an associated DNS record.

Example 1: Find a free IP address

This command finds a free IP address from a range in IPAM. By default, IPAM does not test the reachability of the address or the existence of a corresponding DNS record.

PS C:\> Get-IpamRange -StartIPAddress 10.12.3.1 -EndIPAddress 10.12.3.254 | Find-IpamFreeAddress

Example 2: Find a free IP address and test the reachability of the address

This command finds 10 free IP address from a range in IPAM, and checks if the IP addresses are reachable and whether there is a corresponding DNS record.

PS C:\> $FreeIPs=Get-IpamRange -StartIPAddress 10.12.3.1 -EndIPAddress 10.12.3.254|Find-IpamFreeAddress -NumAddress 10 -TestReachability
PS C:\>$FreeIPs[0]