Get-IpamBlock
Get-IpamBlock
Gets a set of address blocks from IPAM.
Syntax
Parameter Set: ByAddressFamily
Get-IpamBlock [-AddressFamily] <AddressFamily[]> [[-AddressCategory] <AddressCategory[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByNetworkId
Get-IpamBlock -EndIPAddress <IPAddress[]> -NetworkId <String[]> -StartIPAddress <IPAddress[]> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByParent
Get-IpamBlock -MappingToParentBlock <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Detaillierte Beschreibung
The Get-IpamBlock cmdlet gets a set of IP address blocks from IP Address Management (IPAM). Specify the AddressFamily parameter to get a set of IP addresses for address families. Specify the NetworkId, StartIPAddress, and EndIPAddress parameters to get a set of IP address blocks for networks. Specify the MappingToParentBlock parameter to get all the child IP address ranges that belong to 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? |
3 |
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? |
2 |
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 |
-EndIPAddress<IPAddress[]>
Specifies an array of end addresses for IP address blocks.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-MappingToParentBlock<CimInstance>
Specifies an IpamBlock object. This is the parent address block. The cmdlet gets all the child IP address ranges for the parent address block.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-NetworkId<String[]>
Specifies an IP network prefix, in Classless InterDomain Routing (CIDR) notation.
Aliasse |
Keiner |
Erforderlich? |
true |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-StartIPAddress<IPAddress[]>
Specifies an array of start addresses for IP address blocks.
Aliasse |
Keiner |
Erforderlich? |
true |
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 |
<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.
Beispiele
Example 1: Get all private IPv4 address blocks
This command gets all private IPv4 blocks in IPAM. The command returns only the top-level blocks in the block hierarchy. 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-IpamBlock -AddressFamily IPv4 -AddressCategory Private | Format-List NetworkId, StartIPAddress, EndIPAddress
Example 2: Get an address block by using a network Id
This command gets the IP address block from the network that has the ID 10.0.0.0/8. The command specifies the start and end addresses for the address block.
PS C:\> Get-IpamBlock -NetworkId "10.0.0.0/8" -StartIPAddress 10.0.0.0 -EndIPAddress 10.255.255.255
Example 3: Get child IP address ranges mapped to an address block
This example gets all child IP address ranges for an address block.
The first command gets an IpamBlock object that contains the IP address block from the network that has the ID 10.0.0.0/8. The command stores the IpamBlock object in the $Parent variable.
The second command gets all the child IP address ranges for the address block stored in $Parent.
PS C:\> $Parent = Get-IpamBlock -NetworkId "10.0.0.0/8" -StartIPAddress 10.0.0.0 -EndIPAddress 10.255.255.255PS C:\> Get-IpamBlock -MappingToParentBlock $Parent