你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzNetworkManagerIpamPool
更新 IPAM 池。
语法
Set-AzNetworkManagerIpamPool
-InputObject <PSIpamPool>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
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
为 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 |