Import-IpamAddress

Import-IpamAddress

Imports IP address into the IPAM server.

구문

Parameter Set: Import
Import-IpamAddress -AddressFamily <AddressFamily> -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-ErrorPath <String> ] [-Force] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InventoryImport
Import-IpamAddress -AddressFamily <AddressFamily> -ManagedByService <String> -NetworkId <String> -Path <String> -ServiceInstance <String> [-AddressSpace <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-EndIpAddress <IPAddress> ] [-ErrorPath <String> ] [-Force] [-NetworkType <VirtualizationType> ] [-StartIpAddress <IPAddress> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

자세한 설명

The Import-IpamAddress cmdlet imports IP addresses from a comma-separated values (CSV) file into the IP Address Management (IPAM) server.

The cmdlet supports two parameter sets. The Import parameter set adds IP address objects from the CSV file into the IPAM server and updates the existing address objects with updated information specified in the CSV file.

Use the InventoryImport parameter set to periodically import and update all of the IP address objects that map to the IP address range that you specify by using the unique combination of the NetworkId, ManagedByService, ServiceInstance, StartIPAddress, and EndIPAddress parameters. In addition to adding new addresses and changing existing addresses, this operation also removes the addresses which map to the IP address range that you specify but do not exist in the .csv file that you import. The import and update operations of IP addresses for an IP address range succeed only if the range exists the IPAM server.

The only field required in the CSV file that you import is the IP address. Other address-specific fields or custom fields can be specified in any order in the import CSV file.

The IPAM Windows PowerShell import supports both the English and server localized .csv files. The IPAM server uses the presence of the field name IPAddress in the CSV file to determine that the file must be processed in English format. If the field name IPAddress is not present in the CSV file, the CSV file is processed in the server localized format for the field names and enumeration values. The format of date and time values of the imported objects are interpreted in the localized format of the computer that runs the IPAM server and not in Coordinated Universal Time (UTC).

매개 변수

-AddressFamily<AddressFamily>

Specifies the address family of the IP address records in the import file. The IP address records in the CSV file must belong to the address family that you specify for this parameter. 이 매개 변수에 허용되는 값은 다음과 같습니다.

-- IPv4
-- IPv6

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-AddressSpace<String>

Specifies the name of an address space. If you do not specify this parameter, the cmdlet imports the IP addresses into the Default address space. If you specify this parameter, you must specify the AddressFamily parameter.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-AsJob

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-CimSession<CimSession[]>

원격 세션에서 또는 원격 컴퓨터에서 cmdlet을 실행합니다. New-CimSession 또는 Get-CimSession cmdlet의 출력과 같은 컴퓨터 이름이나 세션 개체를 입력합니다. 기본값은 로컬 컴퓨터의 현재 세션입니다.

별칭

Session

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-EndIpAddress<IPAddress>

Specifies the end address for the IP address block. If you do not specify this parameter, the cmdlet uses the last IP address of the network that you specify for the NetworkId parameter. If you specify this parameter, you must specify the StartIPAddress parameter.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ErrorPath<String>

Specifies the literal path of the error CSV files that IPAM generates if one or more IP address records fail to import.

The file name is generated automatically by the computer that runs the IPAM server by prepending Error_ and appending the timestamp of the operation to the file name specified in the Path parameter. The default value of this parameter is the Documents folder of the user.

별칭

없음

필수 여부

false

위치

named

기본값

'Documents' folder of the user

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Force

사용자 확인을 요구하지 않고 명령을 실행합니다.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ManagedByService<String>

Specifies the value of the service that manages the IP address range for which you are importing and updating IP addresses. Specify this parameter and the ServiceInstance, NetworkId, StartIpAddress, and EndIpAddress parameters to uniquely identify a range.

별칭

MB

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-NetworkId<String>

Specifies an IPv4 or IPv6 network prefix, in Classless InterDomain Routing (CIDR) notation. This parameter specifies the IP subnet of the IP address range for which you import the addresses.

Specify this parameter and the ManagedByService, ServiceInstance, StartIpAddress, and EndIpAddress parameters to uniquely identify a range.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-NetworkType<VirtualizationType>

Specifies an IPv4 or IPv6 network prefix, in Classless InterDomain Routing (CIDR) notation. This parameter specifies the IP subnet of the IP address range for which to export the addresses.

Specify this parameter and the ManagedByService, ServiceInstance, StartIpAddress, and EndIpAddress parameters to uniquely identify an address range.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-Path<String>

Specifies the literal path and name of the CSV file to import.

별칭

없음

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-ServiceInstance<String>

Specifies the value of the service instance of the IP address range for which you are importing and updating IP addresses. Specify this parameter and the ManagedByService, NetworkId, StartIpAddress, and EndIpAddress parameters to uniquely identify a range.

별칭

SI

필수 여부

true

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-StartIpAddress<IPAddress>

Specifies the start address for the IP address block. If you do not specify this parameter, the cmdlet uses the first address of the network that you specify for the NetworkId parameter. If you specify this parameter, you must specify the EndIPAddress parameter.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByPropertyName)

와일드카드 문자 허용 여부

false

-ThrottleLimit<Int32>

이 cmdlet을 실행하도록 설정할 수 있는 최대 동시 작업 수를 지정합니다. 이 매개 변수가 생략되거나 값 0이 입력되면 Windows PowerShell®은 컴퓨터에서 실행 중인 CIM cmdlet의 수에 따라 cmdlet에 대한 최적의 제한 한도를 계산합니다. 제한 한도는 현재 cmdlet에만 적용되며 세션이나 컴퓨터에는 적용되지 않습니다.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Confirm

cmdlet을 실행하기 전에 확인 메시지가 표시됩니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행될 경우 결과 동작을 표시합니다. cmdlet이 실행되지 않습니다.

필수 여부

false

위치

named

기본값

false

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • None

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • System.String

    A detailed summary of the steps that the cmdlet performed. The message is one of the following:
    Import of <AddressFamily> objects is complete. <y> out of <y> objects successfully imported.
    or
    Import of <AddressFamily> objects is complete. <x> out of <y> objects successfully imported. <z> out of <y> objects failed to get imported. Failures recorded in the file: <ErrorFilename>

예제

Example 1: Import IPv4 addresses

This command imports the IPv4 addresses from the file C:\Addressv4.csv into the IPAM server. The new addresses are added and existing addresses are edited. The errors, if any, are recorded in the Documents folder of the user in CSV file format. The command runs without user confirmation.

PS C:\> Import-IpamAddress -AddressFamily IPv4 -Path "C:\Addressv4.csv" -Force

Example 2: Import IPv4 addresses and record errors

This command imports IPv4 addresses from the file C:\Addressv4.csv into the IPAM server. The command adds new addresses and modifies and existing addresses. The command records errors that occur during the import a CSV file at the path C:\. The command runs without user confirmation.

PS C:\> Import-IpamAddress -AddressFamily IPv4 -Path "C:\addressv4.csv" -ErrorPath "C:\" -Force

Example 3: Import and update IPv4 addresses in a range

This command imports and updates all of the IPv4 addresses from the specified path that belong to the range specified by the network ID 10.10.10.0/24, the managing service IPAM, and the service instance Localhost. The cmdlet calculates the start IP address as 10.10.10.1 and the end IP address as 10.10.10.254. The cmdlet adds new addresses, changes existing addresses, and removes addresses that belong to the specified range which are not in the CSV file. By default, host IDs that contain all zeros (0) and all ones (1) are skipped for IPv4 address ranges while calculating the starting and ending IP address.

PS C:\> Import-IpamAddress -AddressFamily IPv4 -Path "C:\addressupdatev4.csv" -ManagedByService "IPAM" -ServiceInstance "Localhost" -NetworkId "10.10.10.0/24"

Example 4: Import and update IPv4 addresses that have a start and end address

This command imports and updates all of the IPv4 addresses from the file C:\Addressupdatev4.csv that belong to the range specified by the network ID 10.10.10.0/24, the start IP address 10.10.10.1, the end IP address 10.10.10.50, the managing service IPAM, and the service instance Localhost. The command adds new addresses, changes existing addresses, and removes addresses that belong to the specified range which are not in the CSV file. The command records errors that occur in CSV file in the Documents folder of the user.

PS C:\> Import-IpamAddress -AddressFamily IPv4 -Path "C:\Addressupdatev4.csv" -ManagedByService "IPAM" -ServiceInstance "Localhost" -NetworkId "10.10.10.0/24" -StartIpAddress 10.10.10.1 -EndIpAddress 10.10.10.50 -Force

관련 항목

Export-IpamAddress