Edit

Share via


Set-AzNetworkManagerIpamPool

Updates an IPAM pool.

Syntax

Default (Default)

Set-AzNetworkManagerIpamPool
    -InputObject <PSIpamPool>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzNetworkManagerIpamPool cmdlet updates an IPAM pool.

Examples

Example 1

$ResourceGroupName = "testRG"
$NetworkManagerName = "testNM"
$IpamPoolName = "testPool"
$NewAddressPrefixes = @("10.0.0.0/15", "10.0.0.0/16")

$ipamPool = Get-AzNetworkManagerIpamPool -ResourceGroupName $ResourceGroupName -NetworkManagerName $NetworkManagerName -Name $IpamPoolName

$ipamPool.Properties.AddressPrefixes = [System.Collections.Generic.List[string]]$NewAddressPrefixes

Set-AzNetworkManagerIpamPool -InputObject $ipamPool
Location           : eastus
Tags               : {}
Properties         : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSIpamPoolProperties
TagsTable          :
PropertiesText     : {
                       "ProvisioningState": "Succeeded",
                       "Description": "Test description.",
                       "DisplayName": "allocationView test",
                       "ParentPoolName": "",
                       "IPAddressType": [
                         "IPv4"
                       ],
                       "AddressPrefixes": [
                         "10.0.0.0/15",
                         "10.0.0.0/16"
                       ]
                     }
Name               : testPool
ResourceGroupName  : testRG
NetworkManagerName : testNM
Etag               : "00000000-0000-0000-0000-000000000000"
Type               : Microsoft.Network/networkManagers/ipamPools
SystemData         : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText     : {
                       "CreatedBy": "test@email.com",
                       "CreatedByType": "User",
                       "CreatedAt": "2024-10-01T15:22:51.5180609Z",
                       "LastModifiedBy": "test@email.com",
                       "LastModifiedByType": "User",
                       "LastModifiedAt": "2024-10-03T14:22:22.7534287Z"
                     }
Id                 : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Network/networkManagers/testNM/ipamPools/testPool

Update the IPAM pool's addressPrefixes.

Example 2

$ResourceGroupName = "testRG"
$NetworkManagerName = "testNM"
$IpamPoolName = "testPool"
$NewDisplayName = "My Test Pool"

$ipamPool = Get-AzNetworkManagerIpamPool -ResourceGroupName $ResourceGroupName -NetworkManagerName $NetworkManagerName -Name $IpamPoolName

$ipamPool.Properties.DisplayName = $NewDisplayName

Set-AzNetworkManagerIpamPool -InputObject $ipamPool
Location           : eastus
Tags               : {}
Properties         : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSIpamPoolProperties
TagsTable          :
PropertiesText     : {
                       "ProvisioningState": "Succeeded",
                       "Description": "Test description.",
                       "DisplayName": "My Test Pool",
                       "ParentPoolName": "",
                       "IPAddressType": [
                         "IPv4"
                       ],
                       "AddressPrefixes": [
                         "10.0.0.0/15",
                         "10.0.0.0/16"
                       ]
                     }
Name               : testPool
ResourceGroupName  : testRG
NetworkManagerName : testNM
Etag               : "00000000-0000-0000-0000-000000000000"
Type               : Microsoft.Network/networkManagers/ipamPools
SystemData         : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText     : {
                       "CreatedBy": "test@email.com",
                       "CreatedByType": "User",
                       "CreatedAt": "2024-10-01T15:22:51.5180609Z",
                       "LastModifiedBy": "test@email.com",
                       "LastModifiedByType": "User",
                       "LastModifiedAt": "2024-10-03T14:48:24.9403689Z"
                     }
Id                 : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Network/networkManagers/testNM/ipamPools/testPool

Gives the IPAM pool 'testPool' Display Name of 'My Test Pool'

Parameters

-AsJob

Run cmdlet in the background

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

The Ipam Pool

Parameter properties

Type:PSIpamPool
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
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:None
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.

Inputs

PSIpamPool

Outputs

PSIpamPool