Get-IpamAddress
Get-IpamAddress
Gets IP addresses from IPAM.
構文
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>]
詳細説明
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.
パラメーター
-AddressCategory<AddressCategory[]>
Specifies an array of IP address categories. If you specify this parameter, you must specify the AddressFamily parameter. このパラメーターに対して使用できる値:
-- Public
-- Private
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-AddressFamily<AddressFamily[]>
Specifies an array of address families of IP addresses. このパラメーターに対して使用できる値:
-- IPv4
-- IPv6
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IpAddress<IPAddress[]>
Specifies an array of IP addresses.
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
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.
エイリアス |
MB |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-MappingToBlock<CimInstance>
Specifies an IP block. The cmdlet gets the addresses that belong to the IP block.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-MappingToRange<CimInstance>
Specifies an IP address range. The cmdlet retrieves the addresses that belong to the IP range.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-MappingToSubnet<CimInstance>
Specifies an IP subnet. The cmdlet retrieves the addresses that belong to the IP subnet.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-NetworkType<VirtualizationType[]>
Specifies the network type of the address. このパラメーターに対して使用できる値:
-- 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.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
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.
エイリアス |
SI |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Unmapped
Indicates that the cmdlet gets addresses that do not belong to any address families of IP addresses in IPAM.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
IpamAddress[]
Represents a set of IP addresses on the IPAM server.
例
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