Set-IpamSubnet

Windows Server Technical Preview and Windows 10

Set-IpamSubnet

Modifies an existing IP subnet in IPAM.

Syntax

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

Parameter Set: InputObject (cdxml)
Set-IpamSubnet [-AddCustomConfiguration <String> ] [-CimSession <CimSession[]> ] [-Description <String> ] [-Name <String> ] [-NetworkSite <String> ] [-NewAddressSpace <String> ] [-NewNetworkId <String> ] [-NewNetworkType <VirtualizationType> {NonVirtualized | Provider | Customer} ] [-Owner <String> ] [-PassThru] [-RemoveCustomConfiguration <String> ] [-ThrottleLimit <Int32> ] [-VirtualSubnetId <Int32> ] [-VlanId <UInt16[]> ] [-VmmLogicalNetwork <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]




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

-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

-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 virtual local area networks (VLAN).


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: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

<WorkflowParameters>

This cmdlet supports the following workflow common parameters: -PSParameterCollection, -PSComputerName, -PSCredential, -PSConnectionRetryCount, -PSConnectionRetryIntervalSec, -PSRunningTimeoutSec, -PSElapsedTimeoutSec, -PSPersist, -PSAuthentication, -PSAuthenticationLevel, -PSApplicationName, -PSPort, -PSUseSSL, -PSConfigurationName, -PSConnectionURI, -PSAllowRedirection, -PSSessionOption, -PSCertificateThumbprint, -PSPrivateMetadata, -AsJob, -JobName, and –InputObject. For more information, see    about_WorkflowCommonParameters.

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

    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.

Examples

Example 1 Add metadata to a subnet

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.


PS C:\> Get-IpamSubnet -AddressFamily IPv4|where {$_.Name -Like "Site*"}|Set-IpamSubnet -AddCustomConfiguration "ADSite=Site01" -PassThru | Format-List Name, NetworkId, CustomConfiguration

Example 2: Modify a network ID

This command modifies the NonVirtualized 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 to Site01_2.


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 NonVirtualized

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

Community Additions

ADD
Show: