Export (0) Print
Expand All
Expand Minimize

Export-IpamAddress

Windows Server 2012 R2 and Windows 8.1

Updated: December 18, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Export-IpamAddress

Exports IP addresses from IPAM.

Syntax

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




Detailed Description

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.

Parameters

-AddressFamily<AddressFamily>

Specifies an address family of IP addresses.The acceptable values for this parameter are: 

-- IPv4
-- IPv6


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the absolute path of the exported CSV file.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

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

    This array of objects contains IPAM IP addresses.


Examples

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
IPAddress       IPAddressState    AssignmentType   ManagedByService    ServiceInstance 
---------       --------------    --------------   ----------------    --------------- 
172.22.2.15     In-Use            Static           IPAM                Localhost 
10.10.0.10      In-Use            Static           IPAM                Localhost 
172.17.14.15    Reserved          Dynamic          MS DHCP             s2-infra.contoso.com 
192.168.0.1     Reserved          Dynamic          MS DHCP             s2-infra.contoso.com 

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" }
IPAddress         IPAddressState    AssignmentType   ManagedByService    ServiceInstance 
---------         --------------    --------------   ----------------    --------------- 
10.155.155.155    In-Use            Static           IPAM                Localhost 

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
IPAddress       IPAddressState    AssignmentType   ManagedByService    ServiceInstance 
---------       --------------    --------------   ----------------    --------------- 
172.22.2.15     In-Use            Static           IPAM                Localhost 
10.10.0.10      In-Use            Static           IPAM                Localhost 
172.17.14.15    Reserved          Dynamic          MS DHCP             s2-infra.contoso.com 
192.168.0.1     Reserved          Dynamic          MS DHCP             s2-infra.contoso.com 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft