Set-IpamSubnet

Set-IpamSubnet

Modifies an existing IP subnet in IPAM.

Sintaxis

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>]

Descripción detallada

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

Parámetros

-AddCustomConfiguration<String>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies a description for the subnet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-InputObject<CimInstance[]>

Especifica la entrada para este cmdlet. Puede usar este parámetro o puede canalizar la entrada a este cmdlet.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies the name for the subnet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NetworkType<VirtualizationType[]>

Specifies an array of network types for the subnets to modify. Los valores aceptables para este parámetro son los siguientes:

-- Provider
-- Customer
-- NonVirtualized

If you do not specify a value, all matching IP subnets of network type Provider, Customer, and NonVirtualized will be modified.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-NewNetworkId<String>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

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.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Owner<String>

Specifies an owner for the subnet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-RemoveCustomConfiguration<String>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-VirtualSubnetId<Int32>

Specifies a virtual subnet ID.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-VlanId<UInt16[]>

Specifies an array of unique identifiers for VLANs.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-VmmLogicalNetwork<String>

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

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • IpamSubnet

    Represents a subnet in IPAM Server.

Notas

  • When converting the network type of a subnet from Provider to NonVirtualized, the address space of the subnet is reset to Default.

Ejemplos

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

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

Temas relacionados

Add-IpamSubnet

Export-IpamSubnet

Get-IpamSubnet

Import-IpamSubnet

Remove-IpamSubnet