Import-IpamSubnet
Import-IpamSubnet
Imports IP address subnet objects from the specified file into the computer running IPAM.
Sintaxis
Parameter Set: Import
Import-IpamSubnet -AddressFamily <AddressFamily> -Path <String> [-AsJob] [-CimSession <CimSession[]> ] [-ErrorPath <String> ] [-Force] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
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.
Parámetros
-AddressFamily<AddressFamily>
Specifies an address family of IP address range objects to import. Los valores aceptables para este parámetro son los siguientes:
-- 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.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Force
Fuerza que el comando se ejecute sin pedir confirmación al usuario.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Path<String>
Specifies the fully qualified path and name of the file to import.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Ejemplos
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