Export-IpamRange

Export-IpamRange

Exports all of the IP address ranges as a file or as an array of objects or both.

構文

Parameter Set: ExportRange1
Export-IpamRange -AddressFamily <AddressFamily> [-AsJob] [-CimSession <CimSession[]> ] [-Force] [-NetworkType <VirtualizationType> ] [-PassThru] [-Path <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Export-IpamRange cmdlet exports all of the IP address ranges of the specified address family from the computer running the IP Address Management (IPAM) server as a comma-separated values (.csv) file or as an array of Windows PowerShell® objects or both.

At least one of the Path or PassThru parameters must be specified with the cmdlet. The object array returned using the PassThru parameter can be pipelined for further filtering, if required.

Unlike localized object export from IPAM client user interface (UI), the field header names and the enumeration value names of IP address range objects exported by Windows PowerShell have English names and are not be localized in the language used by the computer running the IPAM server. The field header names must follow the Windows PowerShell property naming conventions.

Note: The format of date and time values of the exported objects are in localized format of the computer running the IPAM server and not in UTC.

The IPAM client UI and IPAM Windows PowerShell support interoperability between import and export functionality of English and localized .csv files, provided that the language and locale of importing and exporting computers running the IPAM servers and associated UI is the same. In other words a localized .csv file exported from IPAM client UI can be imported using IPAM Windows PowerShell and an English .csv file exported from IPAM Windows PowerShell can be imported from IPAM client UI provided the language and locale of the computers running the IPAM client and IPAM server are the same.

パラメーター

-AddressFamily<AddressFamily>

Specifies the address family of IP address range objects being exported. このパラメーターに対して使用できる値: IPv4 or IPv6.
This parameter specifies whether the IPv4 or IPv6 records need to be exported. Only one address family at a time can be specified with this cmdlet.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-CimSession<CimSession[]>

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

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Force

Specifies that new .csv file generated by export must overwrite the existing .csv file (if present), as specified in the Path parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-NetworkType<VirtualizationType>

Specifies the type of network of the given IP subnet. このパラメーターに対して使用できる値:Provider, Customer, and NonVirtualized. If the address space specified by the AddressSpace parameter is Default, specify a value of Provider or NonVirtualized. If the address space specified by AddressSpace parameter is of type Provider, then, if you specify this parameter, specify a value of Provider. Specifying any other value for this parameter causes an error. If the address space specified by the AddressSpace parameter is of type Customer, then, if you specify this parameter, specify a value of Customer. Specifying any other value for this parameter causes an error.If you do not specify this parameter, the cmdlet uses a network type NonVirtualized.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-Path<String>

Specifies the literal path and name of the .csv file which are created during export.
This parameter is used to export all of the IP address range objects in a .csv file format.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

True (ByPropertyName)

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

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

入力

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

  • None

出力

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

  • Microsoft.Windows.Ipam.Commands.IpamIPRangePSObject[]

    This array of objects contains an IPAM IP address range.

Example 1: Export IPv4 address range to a file

This command outputs all of the IPv4 address ranges to the file named Ranges_v4.csv.

PS C:\> Export-IpamRange -AddressFamily IPv4 -Path "C:\Ranges_v4.csv"

Example 2: Export IPv6 address range to a file

This command outputs all of the IPv6 address ranges to the file Ranges_v6.csv, and overwrites the file if it already exists.

PS C:\> Export-IpamRange -AddressFamily IPv6 -Path "C:\Ranges_v6.csv" -Force

Example 3: Export IPv4 address range

This command outputs all of the IPv4 address range objects.

PS C:\> Export-IpamRange -AddressFamily IPv4 -PassThru

Example 4: Export over-utilized IPv4 address range objects

This command filters all of the over-utilized IPv4 address range objects.

PS C:\> Export-IpamRange -AddressFamily IPv4 -PassThru | Where-Object -FilterScript { $_.Utilization -Eq "Over" }

Example 5: Export over-utilized IPv4 address range objects to a file

This command filters all of the over-utilized IPv4 address range objects and exports the objects to a file named Overutilized.csv.

PS C:\> Export-IpamRange -AddressFamily IPv4 -PassThru | Where-Object -FilterScript { $_.Utilization -Eq "Over" } | Export-Csv –Path "C:\overutilized.csv"

Example 6: Export address ranges from a file

This command outputs all of the IPv4 address ranges in the file named C:\Ranges.csv and also displays the exported ranges.

PS C:\> Export-IpamRange -AddressFamily IPv4 -Path "C:\Ranges.csv" -PassThru

関連トピック

Import-IpamRange

Export-Csv

Where-Object