Set-AzNetworkManagerSecurityAdminRule
更新網路管理員安全性系統管理員規則。
語法
Set-AzNetworkManagerSecurityAdminRule
-InputObject <PSNetworkManagerSecurityBaseAdminRule>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-AzNetworkManagerSecurityAdminRule Cmdlet 會更新網路管理員安全性管理員規則。
範例
範例 1
$SecurityAdminRule = Get-AzNetworkManagerSecurityAdminRule -Name "psRule" -RuleCollectionName "psRuleCollection" -SecurityAdminConfigurationName "psSecurityAdminConfig" -NetworkManagerName "psNetworkManager" -ResourceGroupName "psResourceGroup"
$SecurityAdminRule.priority = 50
Set-AzNetworkManagerSecurityAdminRule -InputObject $SecurityAdminRule
Protocol : Tcp
Direction : Inbound
Sources : {Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerAddressPrefixItem}
Destinations : {Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerAddressPrefixItem}
SourcePortRanges : {100}
DestinationPortRanges : {99}
Access : Allow
Priority : 50
SourcesText : [
{
"AddressPrefix": "Internet",
"AddressPrefixType": "ServiceTag"
}
]
DestinationsText : [
{
"AddressPrefix": "10.0.0.1",
"AddressPrefixType": "IPPrefix"
}
]
SourcePortRangesText : [
"100"
]
DestinationPortRangesText : [
"99"
]
DisplayName :
Description : TestDescription
Type : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules
ProvisioningState : Succeeded
SystemData : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText : {
"CreatedBy": "jaredgorthy@microsoft.com",
"CreatedByType": "User",
"CreatedAt": "2022-08-08T00:39:56.4512419Z",
"LastModifiedBy": "jaredgorthy@microsoft.com",
"LastModifiedByType": "User",
"LastModifiedAt": "2022-08-08T01:23:18.6454664Z"
}
Name : psRule
Etag :
Id : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/securityAdminConfigurations/psSecurityAdminConfig/ruleCollections/psRuleCollection/rules/psRule
更新網路管理員安全性管理員規則的優先順序。
參數
-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
網路管理員安全性管理規則
類型: | PSNetworkManagerSecurityBaseAdminRule |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
PSNetworkManagerSecurityBaseAdminRule
輸出
PSNetworkManagerSecurityBaseAdminRule