Get-IpamAddress
Get-IpamAddress
Gets IP addresses from IPAM.
Syntax
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>]
Detaillierte Beschreibung
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.
Parameter
-AddressCategory<AddressCategory[]>
Specifies an array of IP address categories. If you specify this parameter, you must specify the AddressFamily parameter. Die folgenden Werte für diesen Parameter sind zulässig:
-- Public
-- Private
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-AddressFamily<AddressFamily[]>
Specifies an array of address families of IP addresses. Die folgenden Werte für diesen Parameter sind zulässig:
-- IPv4
-- IPv6
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
Keiner |
Erforderlich? |
false |
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 |
-IpAddress<IPAddress[]>
Specifies an array of IP addresses.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
2 |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
MB |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-MappingToBlock<CimInstance>
Specifies an IP block. The cmdlet gets the addresses that belong to the IP block.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-MappingToRange<CimInstance>
Specifies an IP address range. The cmdlet retrieves the addresses that belong to the IP range.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-MappingToSubnet<CimInstance>
Specifies an IP subnet. The cmdlet retrieves the addresses that belong to the IP subnet.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-NetworkType<VirtualizationType[]>
Specifies the network type of the address. Die folgenden Werte für diesen Parameter sind zulässig:
-- 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.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
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.
Aliasse |
SI |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
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 |
-Unmapped
Indicates that the cmdlet gets addresses that do not belong to any address families of IP addresses in IPAM.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
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.
IpamAddress[]
Represents a set of IP addresses on the IPAM server.
Beispiele
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