Export-IpamAddress

Export-IpamAddress

Exports IP addresses from IPAM.

Sintaxis

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

Descripción detallada

The Export-IpamAddress cmdlet exports all of the IP addresses from an address family in IP Address Management (IPAM). The cmdlet exports the IP addresses as a comma-separated value (CSV) file.

The field header names and the enumurated values of IP address objects that this cmdlet exports have English names that are culture-independent (invariant) and are not in the localized language that the server uses. The field header names follow the Windows PowerShell property naming conventions. The format of date and time values of the exported objects are in the localized format of the computer that runs the IPAM server and not in Coordinated Universal Time (UTC).

The IPAM client console and IPAM Server cmdlets in Windows PowerShell support interoperability between import and export functionality of English and localized CSV files, provided that the language and locale of the computers that run the IPAM server that import and export IP addresses are the same. You can import a localized CSV file that you export from a computer that runs the IPAM client UI by using IPAM Windows PowerShell. You can import an English CSV file that you exported by using IPAM Windows PowerShell from a computer that runs the IPAM client provided the language and locale of the computers that run the IPAM client and IPAM server are the same.

Parámetros

-AddressFamily<AddressFamily>

Specifies an address family of IP addresses.Los valores aceptables para este parámetro son los siguientes:

-- IPv4
-- IPv6

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

-Force

Indicates that the cmdlet overwrites a CSV file that has the same name that you specify for the Path parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

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 import the addresses.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Path<String>

Specifies the absolute path of the exported CSV file.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿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

<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.

  • None

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

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

    This array of objects contains IPAM IP addresses.

Ejemplos

Example 1: Export all IPv4 addresses

This command exports all the IPv4 addresses in the IPAM server to the specified path.

PS C:\> Export-IpamAddress -AddressFamily IPv4 -Path "C:\Addresses_v4.csv"

Example 2: Export all IPv6 addresses

This command exports all the IPv6 addresses in IPAM to the specified path. The command overwrites the file without prompting the user if it already exists.

PS C:\> Export-IpamAddress -AddressFamily IPv6 -Path "C:\addresses_v6.csv" -Force

Example 3: Output all IPv4 addresses

This command outputs all the IPv4 address objects in IPAM.

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

Example 4: Output all expired IPv4 addresses

This command filters and outputs all of the expired IPv4 address in IPAM.

PS C:\> Export-IpamAddress -AddressFamily IPv4 -PassThru | Where-Object -FilterScript { $_.ExpiryStatus -Eq "Expired" }

Example 5: Export all expired IPv4 addresses

This command filters and exports all the expired IPv4 addresses in IPAM to the specified path.

PS C:\> Export-IpamAddress -AddressFamily IPv4 -PassThru | Where-Object -FilterScript { $_.ExpiryStatus -Eq "Expired" } | Export-Csv –Path "C:\expired.csv"

Example 6: Export and output all expired IPv4 addresses

This command exports all of the IPv4 Addresses in IPAM and outputs the exported addresses.

PS C:\> Export-IpamAddress -AddressFamily IPv4 -Path "C:\Addresses.csv" -PassThru

Temas relacionados

Import-IpamAddress

Add-IpamAddress

Get-IpamAddress

Set-IpamAddress

Remove-IpamAddress

Import-IpamAddress