共用方式為


Set-AzNetworkManagerIpamPool

更新IPAM集區。

語法

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

Description

Set-AzNetworkManagerIpamPool Cmdlet 會更新 IPAM 集區。

範例

範例 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
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

更新 IPAM 集區的 addressPrefixes。

範例 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
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

提供 'My Test Pool' 的 IPAM 集區 'testPool' 顯示名稱

參數

-AsJob

在背景執行 Cmdlet

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

Ipam 集區

類型:PSIpamPool
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

Microsoft.Azure.Commands.Network.Models.NetworkManager.PSIpamPool

輸出

Microsoft.Azure.Commands.Network.Models.NetworkManager.PSIpamPool