Set-IpamSubnet
Modifies an existing IP subnet in IPAM.
Syntax
Query (cdxml) (Default)
Set-IpamSubnet
-NetworkId <String[]>
[-NetworkType <VirtualizationType[]>]
[-AddressSpace <String[]>]
[-NewNetworkId <String>]
[-NewNetworkType <VirtualizationType>]
[-NewAddressSpace <String>]
[-Name <String>]
[-Owner <String>]
[-Description <String>]
[-VlanId <UInt16[]>]
[-VmmLogicalNetwork <String>]
[-NetworkSite <String>]
[-VirtualSubnetId <Int32>]
[-AddCustomConfiguration <String>]
[-RemoveCustomConfiguration <String>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
InputObject (cdxml)
Set-IpamSubnet
-InputObject <CimInstance[]>
[-NewNetworkId <String>]
[-NewNetworkType <VirtualizationType>]
[-NewAddressSpace <String>]
[-Name <String>]
[-Owner <String>]
[-Description <String>]
[-VlanId <UInt16[]>]
[-VmmLogicalNetwork <String>]
[-NetworkSite <String>]
[-VirtualSubnetId <Int32>]
[-AddCustomConfiguration <String>]
[-RemoveCustomConfiguration <String>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-IpamSubnet cmdlet modifies an existing IP subnet in IP Address Management (IPAM).
Examples
Example 1 Add metadata to a subnet
PS C:\> Get-IpamSubnet -AddressFamily IPv4|where {$_.Name -Like "Site*"}|Set-IpamSubnet -AddCustomConfiguration "ADSite=Site01" -PassThru | Format-List Name, NetworkId, CustomConfiguration
Name : Site01_1
NetworkId : 20.20.128.0/24
CustomConfiguration : ADSite=Site01; Name : Site01_2
NetworkId : 10.20.1.0/24
CustomConfiguration : ADSite=Site01;
Name : Site01_3
NetworkId : 10.20.2.0/24
CustomConfiguration : ADSite=Site01;
Name : Site01_4
NetworkId : 10.20.4.0/24
CustomConfiguration : ADSite=Site01;
Name : Site01_5
NetworkId : 10.20.8.0/24
CustomConfiguration : ADSite=Site01;
This command adds ADSite information as metadata to all subnets allocated to Site01.
The command includes the PassThru parameter, so it displays results to the console.
Example 2: Modify a network ID
PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/16 -NetworkType NonVirtualized -NewNetworkId 10.10.1.0/17
This command modifies the NonVirtualized network ID of a subnet.
Example 3: Rename a subnet
PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -Name "Site01_2"
This command renames a subnet to Site01_2.
Example 4: Convert the network type to provider
PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType NonVirtualized -NewNetworkType Provider
This command converts the network type of a subnet from NonVirtualized to Provider. By default, the provider subnet will be assigned to default provider address space.
Example 5: Convert the network type to non-virtualized
PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType Provider -NewNetworkType NonVirtualized
This command converts the network type of a subnet from Provider to NonVirtualized.
Example 6: Convert the network type and assign to a provider address space
PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType NonVirtualized -NewNetworkType Provider -NewAddressSpace ContosoDataCenter
This command modifies the network type of a subnet from NonVirtualized to Provider, and assigns this subnet to the provider address space ContosoDataCenter.
Parameters
-AddCustomConfiguration
Specifies semi-colon (;) separated name/value pairs. This parameter specifies custom metadata that are 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 |
-AddressSpace
Specifies an array of address spaces to which this IP address range belongs. If you do not specify a value, the cmdlet modifies matching ranges from all address spaces.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Query (cdxml)
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 |
-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 |
-Description
Specifies a description for the subnet.
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 |
-InputObject
Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.
Parameter properties
Type: | CimInstance[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
InputObject (cdxml)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name for the subnet.
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 |
-NetworkId
Specifies the network and the prefix for the given subnet. 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
Query (cdxml)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-NetworkSite
Specifies a network site. A network site is associated with a logical network and forms an abstraction of the physical network. A logical network can contain many network sites. This property is inherited by all ranges and addresses associated with the given subnet.
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 |
-NetworkType
Specifies an array of network types for the subnets to modify.
The acceptable values for this parameter are:
Provider -- Customer -- NonVirtualized
If you do not specify a value, all matching IP subnets of network type Provider, Customer, and NonVirtualized will be modified.
Parameter properties
Type: | VirtualizationType[] |
Default value: | None |
Accepted values: | NonVirtualized, Provider, Customer |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Query (cdxml)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-NewAddressSpace
Specifies the name of a new address space for the IP subnet. A subnet of network type NonVirtualized can only belong to the Default address space. A subnet of network type Provider can belong to either the Default address space or a Provider address space. A subnet of network type Customer can only belong to a Customer 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 |
-NewNetworkId
Specifies the name of a new value of network ID for this subnet.
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 |
-NewNetworkType
Specifies the name of a new value of network type for this address. You can change the network type from NonVirtualized to Provider, or from Provider to NonVirtualized. However, you cannot convert network type from NonVirtualized or Provider to Customer.
Parameter properties
Type: | VirtualizationType |
Default value: | None |
Accepted values: | NonVirtualized, Provider |
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 an owner for the subnet.
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 |
-RemoveCustomConfiguration
Specifies a list of custom metadata fields to modify. The list is a string of name-value pairs, separated by semicolons (;).
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: | False |
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 |
-VirtualSubnetId
Specifies a virtual subnet ID.
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: | True |
Value from remaining arguments: | False |
-VlanId
Specifies an array of unique identifiers for virtual local area networks (VLAN).
Parameter properties
Type: | UInt16[] |
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 |
-VmmLogicalNetwork
Specifies the abstraction of a physical network that describes a particular function in your environment such as backend or frontend.
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 |
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
IpamSubnet
This cmdlet returns an object that represents a subnet in IPAM Server.
Notes
- When converting the network type of a subnet from Provider to NonVirtualized, the address space of the subnet is reset to Default.