Get-IpamAddress
Get-IpamAddress
Gets IP addresses from IPAM.
Sintaxis
Parameter Set: ByAddress
Get-IpamAddress [-IpAddress] <IPAddress[]> [-AddressSpace <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ManagedByService <String[]> ] [-NetworkType <VirtualizationType[]> ] [-ServiceInstance <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByAddressFamily
Get-IpamAddress -AddressFamily <AddressFamily[]> [-AddressCategory <AddressCategory[]> ] [-AddressSpace <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ManagedByService <String[]> ] [-NetworkType <VirtualizationType[]> ] [-ServiceInstance <String[]> ] [-ThrottleLimit <Int32> ] [-Unmapped] [ <CommonParameters>]
Parameter Set: ByBlock
Get-IpamAddress -MappingToBlock <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByRange
Get-IpamAddress -MappingToRange <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: BySubnet
Get-IpamAddress -MappingToSubnet <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Descripción detallada
The Get-IpamAddress cmdlet gets IP addresses from IP Address Management (IPAM). Specify the IpAddress parameter to retrieve an IP address. Specify the AddressFamily parameter to retrieve a set of IP addresses for address families. You can also get addresses that belong to a range, a subnet, or an address block.
Parámetros
-AddressCategory<AddressCategory[]>
Specifies an array of IP address categories. If you specify this parameter, you must specify the AddressFamily parameter. Los valores aceptables para este parámetro son los siguientes:
-- Public
-- Private
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-AddressFamily<AddressFamily[]>
Specifies an array of address families 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 |
-AddressSpace<String[]>
Specifies an array of names of address spaces. If you do not specify this parameter, the cmdlet gets the addresses for all address spaces in IPAM. If you specify this parameter, you must specify the AddressFamily parameter.
Alias |
ninguno |
¿Requerido? |
false |
¿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 |
-IpAddress<IPAddress[]>
Specifies an array of IP addresses.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ManagedByService<String[]>
Specifies an array of names of the services that manage the IP addresses. The values that you specify for this parameter must exist in the set of values that you defined for the ManagedByService custom field in IPAM.
You can use the Add-IpamCustomValue to add a value to the ManagedByService custom field in IPAM. You can use the Remove-IpamCustomValue to remove a value from the ManagedByService custom field in IPAM.
Alias |
MB |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-MappingToBlock<CimInstance>
Specifies an IP block. The cmdlet gets the addresses that belong to the IP block.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-MappingToRange<CimInstance>
Specifies an IP address range. The cmdlet retrieves the addresses that belong to the IP range.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-MappingToSubnet<CimInstance>
Specifies an IP subnet. The cmdlet retrieves the addresses that belong to the IP subnet.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-NetworkType<VirtualizationType[]>
Specifies the network type of the address. Los valores aceptables para este parámetro son los siguientes:
-- Provider
-- Customer
-- NonVirtualized
The default value is NonVirtualized.
If you specify Default for the AddressSpace parameter, the valid values for this parameter are Provider and NonVirtualized. If you specify a provider type of address space for the AddressSpace parameter, you must specify Provider for this parameter. If you specify a customer type of address space for the AddressSpace parameter, you must specify Customer for this parameter.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ServiceInstance<String[]>
Specifies an array of instances of the services that manage the IP addresses. Specify the instances of the service that you specified for the ManagedByService parameter. The value that you specify for this parameter must exist in the set of values that you defined for the ServiceInstance custom field in IPAM.
Alias |
SI |
¿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 |
-Unmapped
Indicates that the cmdlet gets addresses that do not belong to any address families of IP addresses in IPAM.
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.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
IpamAddress[]
Represents a set of IP addresses on the IPAM server.
Ejemplos
Example 1: Get all private physical IPv4 addresses
This command gets all private physical IPv4 addresses in IPAM. Because the command specifies the Default address space, the command gets provider or non-virtualized IP addresses from all address spaces in IPAM.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -AddressSpace "Default"
Example 2: Get private IPv4 addresses for provider networks
This command gets all private IPv4 addresses for provider networks. Because the command does not specify the AddressSpace parameter, the command gets addresses that belong to all address spaces in IPAM.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -NetworkType Provider
Example 3: Get private IPv4 addresses from the default address space
This command gets all private IPv4 addresses for provider networks. Because the command specifies the Default address space, the command gets IP addresses from all address spaces configured in IPAM.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -NetworkType Provider -AddressSpace "Default"
Example 4: Get private IPv4 addresses for customer networks
This command gets all private IPv4 addresses for customer networks. Because the command does not specify the AddressSpace parameter, the command gets addresses that belong to all address spaces configured in IPAM.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -NetworkType Customer
Example 5: Get private IPv4 addresses for customer networks from an address space
This command gets all private IPv4 addresses for customer networks that belong to the address space named ContosoAddSpace01.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressCategory Private -NetworkType Customer -AddressSpace "ContosoAddSpace01"
Example 6: Get physical IP addresses from all address spaces
This command gets the physical IP addresses 10.12.1.1 and 10.12.3.1. Because the command does not specify the AddressSpace parameter, the command gets IP addresses from all address spaces which match the IP address 10.12.1.1 and 10.12.3.1.
PS C:\> Get-IpamAddress -IpAddress 10.12.1.1, 10.12.3.1
Example 7: Get duplicate addresses in an address space
This command gets all duplicate IPv4 addresses in the default provider address space. The Default address space is the address space to which the IPAM entity belongs. The command returns two addresses that have the address IP 172.16.10.16. One address is managed by IPAM and the other address is managed by . The IPAM server marks both these addresses as duplicate. The command uses the Format-List cmdlet to display the output in the form of a table. For more information, type Get-Help Format-Table
.
PS C:\> Get-IpamAddress -AddressFamily IPv4 -AddressSpace Default | Where-Object {$_.duplicate -eq $true} | Format-List IPAddress, NetworkType, ManagedByService, ServiceInstance, ProviderAddressSpace
Example 8: Get IP addresses that map to a subnet
This example gets all IP addresses that map to a subnet. Because the network type of the subnet is non-virtualized, the result contains only physical addresses and the fabric addresses from the default address space which belong to the subnet.
The first command uses the Get-IpamSubnet cmdlet to get the IpamSubnet object that contain subnets configured in IPAM for the network that has the ID 10.12.0.0/16. The command stores the object in the $ContosoPhysicalSubnet variable.
The second command gets all the IP addresses that belong to the IP subnet stored in the $ContosoPhysicalSubnet variable.
PS C:\> $ContosoPhysicalSubnet = Get-IpamSubnet -NetworkId "10.12.0.0/16"PS C:\>Get-IpamAddress -MappingToSubnet $ContosoPhysicalSubnet
Example 9: Get all IP address that map to a an IP range
This example gets all IP addresses that belong to a range of IP addresses.
The first command uses the Get-IpamRange cmdlet to get an IpamRange object that contains an IP range configured in IPAM. The command stores the object in the $Range variable.
The second command gets all the IP addresses that belong to the range stored in the $Range variable.
PS C:\> $Range = Get-IpamRange -StartIPAddress 10.12.1.1 -EndIPAddress 10.12.1.254 PS C:\>Get-IpamAddress -MappingToRange $Range