Import-IpamSubnet
Import-IpamSubnet
Imports IP address subnet objects from the specified file into the computer running IPAM.
Syntax
Parameter Set: Import
Import-IpamSubnet -AddressFamily <AddressFamily> -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-ErrorPath <String> ] [-Force] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detaillierte Beschreibung
The Import-IpamSubnet cmdlet imports IP address subnet objects from the specified file into the computer that runs the IP Address Management (IPAM) server. The cmdlet logs objects that fail to import during the operation. Use this cmdlet to import both virtualized and non-virtualized subnets. The cmdlet adds new IP address subnet objects from the comma separated value .csv file into the computer that runs the IPAM server and edits the existing subnet objects with the updated information specified in the .csv file. The .csv file can contain both virtualized and non-virtualized subnets. If the file you import does not contain the columns NetworkType, ProviderAddressSpace and CustomerAddressSpace in the header, the cmdlet assumes all subnets are non-virtualized, and it adds them to the default address space. If the header contains these columns, then the cmdlet uses the network type to add the subnets to given provider or customer address space.
Parameter
-AddressFamily<AddressFamily>
Specifies an address family of IP address range objects to import. Die folgenden Werte für diesen Parameter sind zulässig:
-- IPv4
-- IPv6
You can specify only one address family at a time using this cmdlet and the records in the file should match the address family you specify with this parameter.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-AsJob
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-CimSession<CimSession[]>
Führt das Cmdlet in einer Remotesitzung oder auf einem Remotecomputer aus. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, z. B. die Ausgabe eines Cmdlets New-CimSession oder Get-CimSession. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.
Aliasse |
Session |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-ErrorPath<String>
Specifies the fully qualified path, but not the name, of the error files that are created if one or more records fail to import. The IPAM server generates file names by prepending the string Error_ and appending the timestamp of the operation to the file name. The default value of this parameter is the %windir%\temp folder.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-Force
Erzwingt, dass der Befehl ohne Benutzerbestätigung ausgeführt wird.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Path<String>
Specifies the fully qualified path and name of the file to import.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-ThrottleLimit<Int32>
Gibt die maximale Anzahl von gleichzeitigen Vorgängen an, die zum Ausführen dieses Cmdlets eingerichtet werden können. Wenn dieser Parameter ausgelassen oder der Wert 0
eingegeben wird, berechnet Windows PowerShell® einen optimalen Drosselungsgrenzwert für das Cmdlet basierend auf der Anzahl der CIM-Cmdlets, die auf dem Computer ausgeführt werden. Die Drosselungsgrenze gilt nur für das aktuelle Cmdlet und nicht für die Sitzung oder den Computer.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-Confirm
Sie werden vor dem Ausführen des Cmdlets zur Bestätigung aufgefordert.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Erforderlich? |
false |
Position? |
named |
Standardwert |
falsch |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
Beispiele
Example 1: Import IPv4 subnets
This command imports the IPv4 subnets from the file Subnetsv4.csv into the computer that runs IPAM. The command adds the new subnets and modifies existing addresses. The command records any errors in the default folder, %windir%\temp for the user, in .csv file format.
PS C:\> Import-IpamSubnet -AddressFamily IPv4 -Path "C:\subnetsv4.csv" -Force
Example 2: Import IPv4 subnets and specify the error path
This command imports IPv4 subnets from the file Subnetsv4.csv into the computer that runs the IPAM server. The command adds new subnets and modifies existing subnets.
PS C:\> Import-IpamAddress -AddressFamily IPv4 -Path "C:\addressv4.csv" -ErrorPath "C:\" -Force