The Add-IpamRange cmdlet adds an IP address range to the configuration of an IP Address Management (IPAM) server.
Use this cmdlet to add a Non-Virtualized, Provider, or a Customer IP address range in IPAM.
If the network type is Provider or NonVirtualized, the range will be added to default address space if you do not specify an address space.
If the network type is Customer, you must specify an address space.
This command adds an IP address range that is managed by the current instance of IPAM server.
This range is added to the default address space.
The command includes the PassThru parameter, so it displays results to the console.
Example 2: Add an IP address range by using a network ID
PS C:\> Add-IpamRange -NetworkId "172.16.10.0/24"
Add-IpamRange : No subnet exists corresponding to the range.
At line:1 char:1
+ Add-IpamRange -NetworkId 172.16.10.0/24
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (MSFT_IPAM_Range:ROOT/microsoft/ipam/MSFT_IPAM_Range) [Add-IpamRang
e], CimException
+ FullyQualifiedErrorId : WIN32 8,Add-IpamRange
This command adds an IP address range with network id 172.16.10.0/24.
IPAM does not allow creation of a range for which a corresponding subnet does not exist.
Example 3: Add an IP address range by using a network ID and create a subnet
This command adds an IP address range with network id 172.16.10.0/24.
The command uses the CreateSubnetIfNotFound parameter to automatically create the corresponding subnet, and adds WINS and Gateway servers to the range.
Gateway servers are specified in the format <IP Address>/<Metric>.
Example 4: Add a provider IP address range to an existing IPAM configuration
This command adds a provider IP range 172.16.19.0/24 with start and end IP addresses 172.16.19.10 and 172.16.19.110.
The command adds the range to a provider address space named ContosoDataCenter.
Since this range is in a different address space, IPAM will not mark it as overlapping.
The command includes the PassThru parameter, so it displays results to the console.
Parameters
-AddressSpace
Specifies an address space to which this IP address range belongs.
An address space contains IP subnets, IP ranges, and IP addresses.
If you do not specify this parameter, the default address space is used.
The default address space is the Provider address space.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AssignmentDate
Specifies a date on which to assign addresses in this range.
Parameter properties
Type:
DateTime
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-AssignmentType
Specifies how IPAM assigns the addresses.
The acceptable values for this parameter are:
Static
Dynamic
Auto
VIP
Reserved
Parameter properties
Type:
AddressAssignment
Default value:
None
Accepted values:
Static, Dynamic, Auto, VIP, Reserved
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-AssociatedReverseLookupZone
The Add-IpamRange cmdlet adds an IP address range to the configuration of an IP Address Management (IPAM) server.
Use this cmdlet to add a Non-Virtualized, Provider, or a Customer IP address range in IPAM.
If the network type is Provider or NonVirtualized, the range will be added to default address space if you do not specify an address space.
If the network type is Customer, you must specify an address space.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-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.
Parameter properties
Type:
CimSession[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Session
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ConnectionSpecificDnsSuffix
Specifies the connection-specific DNS suffix to associate with this range.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-CreateSubnetIfNotFound
Indicates that the cmdlet creates a parent subnet for this range of addresses.
If you specify this parameter, the cmdlet automatically creates a parent subnet for this range, if no parent subnet exists.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CustomConfiguration
Specifies semicolon-separated name/value pairs.
This parameter specifies custom metadata that is associated with the address space.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Description
Specifies a description for the range.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-DnsServer
Specifies an array of DNS servers to associate with this range.
Specify the names of the DNS servers in the order of preference, highest to lowest.
Parameter properties
Type:
IPAddress[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-DnsSuffix
Specifies an array of search suffixes to associate with the given range.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-EndIPAddress
Specifies an IP address.
For this parameter, the address represents the high end of the range to add.
Parameter properties
Type:
IPAddress
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Gateway
Specifies an array of gateway servers, imported from a DHCP Scope, to associate with a range in IPAM.
Specify the names of the gateway servers in the order of preference, highest to lowest.
The format for specification is <ipaddress>\<metric>.
To specify the Automatic metric, use the format <Ipaddress>\Automatic.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ManagedByService
Specifies the value of the managing service of the IP address ranges being added.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
MB
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-NetworkId
Specifies the network and the prefix for the given range.
Specify the network ID in Classless Interdomain Routing (CIDR) notation in the format Network/Prefix.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-NetworkType
Specifies an array of network types for the addresses to be added.
The acceptable values for this parameter are:
Provider
Customer
NonVirtualized
If the value of the AddressSpace parameter is Default, then this parameter can use the value Provider or NonVirtualized.
If the value of the AddressSpace parameter is Provider, then the value of this parameter, if specified, must be Provider.
Specifying any other value for this parameter will result in an error.
Similarly, if the value of the AddressSpace parameter is Customer, then the value of this parameter, if specified, must be Customer.
Specifying any other value for this parameter will result in an error.
If you do not specify this parameter, network type defaults to NonVirtualized.
Parameter properties
Type:
VirtualizationType
Default value:
None
Accepted values:
NonVirtualized, Provider, Customer
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Owner
Specifies the name of an owner for an address range.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PassThru
Returns an object representing the item with which you are working.
By default, this cmdlet does not generate any output.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ReservedAddress
Specifies the reserved addresses in the range.
Specify the reserved addresses as a list, in descending order of precedence.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ServiceInstance
Specifies the service instance that manages the address ranges to add.
The value specified for this field should be present in the set of values defined for the ServiceInstance custom field in IPAM.
The cmdlet will report an error if this is not found to be a valid value for the ServiceInstance custom field.
The user can edit the associated custom field to add or delete values.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
SI
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-StartIPAddress
Specifies an IP address.
For this parameter, the address represents the low end of the range to add.
Parameter properties
Type:
IPAddress
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
2
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ThrottleLimit
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.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-UtilizationCalculation
Specifies the utilization information type that will be automatically calculated by IPAM or specified by the user.
Parameter properties
Type:
UtilizationCalculation
Default value:
None
Accepted values:
Auto, UserSpecified
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-UtilizedAddresses
Specifies the number of addresses to utilize from the pool of IP addresses.
Parameter properties
Type:
Double
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-VIP
Specifies an array of virtual IP addresses that are usually set aside for load balancers.
Specify the VIPs as a list, in descending order of precedence.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WinsServer
Specifies an array of Windows Internet Name Service (WINS) servers to associate with this range.
Specify the WINS servers in decreasing order of precedence.
Parameter properties
Type:
IPAddress[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Outputs
CimInstance
This cmdlet returns the IP address range object added to the IPAM data store.