共用方式為


Set-AzNetworkManagerSecurityAdminRuleCollection

更新網路管理員安全性管理員規則集合。

語法

Set-AzNetworkManagerSecurityAdminRuleCollection
   -InputObject <PSNetworkManagerSecurityAdminRuleCollection>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzNetworkManagerSecurityAdminRuleCollection Cmdlet 會更新網路管理員安全性管理員規則集合。

範例

範例 1

$NetworkManagerSecurityAdminRuleCollection = Get-AzNetworkManagerSecurityAdminRuleCollection -SecurityAdminConfigurationName "psSecurityAdminConfig" -Name "psRuleCollection" -NetworkManagerName "psNetworkManager" -ResourceGroupName "psResourceGroup"
$groupItem = New-AzNetworkManagerSecurityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
$groupItem2 = New-AzNetworkManagerSecurityGroupItem -NetworkGroupId "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2"
[System.Collections.Generic.List[Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerSecurityGroupItem]]$configGroup  = @() 
$configGroup.Add($groupItem)
$configGroup.Add($groupItem2)
$NetworkManagerSecurityAdminRuleCollection.AppliesToGroups = $configGroup
Set-AzNetworkManagerSecurityAdminRuleCollection -InputObject $NetworkManagerSecurityAdminRuleCollection

AppliesToGroups     : {/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup,
                      /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2}
AppliesToGroupsText : [
                        {
                          "NetworkGroupId":
                      "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup"
                        },
                        {
                          "NetworkGroupId":
                      "/subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/networkGroups/psNetworkGroup2"
                        }
                      ]
DisplayName         :
Description         :
Type                : Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections
ProvisioningState   : Succeeded
SystemData          : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText      : {
                        "CreatedBy": "jaredgorthy@microsoft.com",
                        "CreatedByType": "User",
                        "CreatedAt": "2022-08-08T00:34:32.030751Z",
                        "LastModifiedBy": "jaredgorthy@microsoft.com",
                        "LastModifiedByType": "User",
                        "LastModifiedAt": "2022-08-08T01:19:40.2407843Z"
                      }
Name                : psRuleCollection
Etag                :
Id                  : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager/securityAdminConfigurations/psSecurityAdminConfig/ruleCollections/psRuleCollection

更新網路管理員安全性系統管理員規則集合,以包含新的網路群組。

參數

-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

The NetworkManagerSecurityAdminRuleCollection

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

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

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

輸入

String

PSNetworkManagerSecurityAdminRuleCollection

輸出

PSNetworkManagerSecurityAdminRuleCollection