Export (0) Print
Expand All
Expand Minimize

Set-IpamSubnet

Windows Server 2012 R2 and Windows 8.1

Updated: December 18, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Set-IpamSubnet

Modifies an existing IP subnet in IPAM.

Syntax

Parameter Set: Query (cdxml)
Set-IpamSubnet -NetworkId <String[]> [-AddCustomConfiguration <String> ] [-AddressSpace <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-Name <String> ] [-NetworkSite <String> ] [-NetworkType <VirtualizationType[]> ] [-NewAddressSpace <String> ] [-NewNetworkId <String> ] [-NewNetworkType <VirtualizationType> ] [-Owner <String> ] [-PassThru] [-RemoveCustomConfiguration <String> ] [-ThrottleLimit <Int32> ] [-VirtualSubnetId <Int32> ] [-VlanId <UInt16[]> ] [-VmmLogicalNetwork <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
Set-IpamSubnet -InputObject <CimInstance[]> [-AddCustomConfiguration <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-Description <String> ] [-Name <String> ] [-NetworkSite <String> ] [-NewAddressSpace <String> ] [-NewNetworkId <String> ] [-NewNetworkType <VirtualizationType> ] [-Owner <String> ] [-PassThru] [-RemoveCustomConfiguration <String> ] [-ThrottleLimit <Int32> ] [-VirtualSubnetId <Int32> ] [-VlanId <UInt16[]> ] [-VmmLogicalNetwork <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-IpamSubnet cmdlet modifies an existing IP subnet in IP Address Management (IPAM).

Parameters

-AddCustomConfiguration<String>

Specifies semi-colon separated name/value pairs. This parameter specifies custom metadata that are associated with the address space.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AddressSpace<String[]>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<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.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

Specifies a description for the subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<CimInstance[]>

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name for the subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NetworkId<String[]>

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NetworkSite<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NetworkType<VirtualizationType[]>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewAddressSpace<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewNetworkId<String>

Specifies the name of a new value of network ID for this subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewNetworkType<VirtualizationType>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Owner<String>

Specifies an owner for the subnet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RemoveCustomConfiguration<String>

Specifies a list of custom metadata fields to modify. The list is a string of name-value pairs, separated by semicolons (;).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualSubnetId<Int32>

Specifies a virtual subnet ID.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-VlanId<UInt16[]>

Specifies an array of unique identifiers for VLANs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-VmmLogicalNetwork<String>

Specifies the abstraction of a physical network that describes a particular function in your environment such as backend or frontend.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • IpamSubnet



    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.


Examples

Example 1 Add metadata to a subnet

This command adds ADSite information as metadata to all subnets allocated to Site01.


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;

Example 2: Modify a network ID

This command modifies the network ID of a subnet.


PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/16 -NetworkType NonVirtualized -NewNetworkId 10.10.1.0/17

Example 3: Rename a subnet

This command renames a subnet.


PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -Name Site01_2

Example 4: Convert the network type to 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.


PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType NonVirtualized -NewNetworkType Provider

Example 5: Convert the network type to non-virtualized

This command converts the network type of a subnet from Provider to NonVirtualized.


PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType Provider -NewNetworkType NonVirtualizedPS C:\>Get-IpamSubnet

Example 6: Convert the network type and assign to a provider address space

This command modifies the network type of a subnet from NonVirtualized to Provider, and assigns this subnet to the provider address space ContosoDataCenter.


PS C:\> Set-IpamSubnet -NetworkId 10.10.1.0/17 -NetworkType NonVirtualized -NewNetworkType Provider -NewAddressSpace ContosoDataCenter

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft