你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzNetworkManager

更新网络管理器。

语法

Set-AzNetworkManager
   -InputObject <PSNetworkManager>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

说明

Set-AzNetworkManager cmdlet 更新网络管理器。

示例

示例 1

$networkManager = Get-AzNetworkManager -ResourceGroupName "psResourceGroup" -Name "psNetworkManager"
$networkManager.Description = "updated description"
Set-AzNetworkManager -InputObject $networkManager

Location                        : westus
Tag                             : {}
NetworkManagerScopes            : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerScopes
NetworkManagerScopeAccesses     : {Connectivity, SecurityAdmin}
NetworkManagerScopeAccessesText : [
                                    "Connectivity",
                                    "SecurityAdmin"
                                  ]
NetworkManagerScopesText        : {
                                    "ManagementGroups": [
                                      "/providers/Microsoft.Management/managementGroups/PowerShellTest"
                                    ],
                                    "Subscriptions": [
                                      "/subscriptions/0fd190fa-dd1c-4724-b7f6-c5cc3ba5c884"
                                    ]
                                  }
TagsTable                       :
DisplayName                     :
Description                     : updated description
Type                            : Microsoft.Network/networkManagers
ProvisioningState               : Succeeded
SystemData                      : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText                  : {
                                    "CreatedBy": "jaredgorthy@microsoft.com",
                                    "CreatedByType": "User",
                                    "CreatedAt": "2022-08-07T04:12:51.7463424Z",
                                    "LastModifiedBy": "jaredgorthy@microsoft.com",
                                    "LastModifiedByType": "User",
                                    "LastModifiedAt": "2022-08-08T00:50:28.6707606Z"
                                  }
Name                            : psNetworkManager
Etag                            :
Id                              : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager

更新网络管理器说明的示例。

示例 2

$networkManager = Get-AzNetworkManager -ResourceGroupName "psResourceGroup" -Name "psNetworkManager"
$access  = @("Connectivity", "SecurityAdmin")
$networkManager.NetworkManagerScopeAccesses = $access
Set-AzNetworkManager -InputObject $networkManager

Location                        : westus
Tag                             : {}
NetworkManagerScopes            : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSNetworkManagerScopes
NetworkManagerScopeAccesses     : {Connectivity, SecurityAdmin}
NetworkManagerScopeAccessesText : [
                                    "Connectivity",
                                    "SecurityAdmin"
                                  ]
NetworkManagerScopesText        : {
                                    "ManagementGroups": [
                                      "/providers/Microsoft.Management/managementGroups/PowerShellTest"
                                    ],
                                    "Subscriptions": [
                                      "/subscriptions/0fd190fa-dd1c-4724-b7f6-c5cc3ba5c884"
                                    ]
                                  }
TagsTable                       :
DisplayName                     :
Description                     : updated description
Type                            : Microsoft.Network/networkManagers
ProvisioningState               : Succeeded
SystemData                      : Microsoft.Azure.Commands.Network.Models.NetworkManager.PSSystemData
SystemDataText                  : {
                                    "CreatedBy": "jaredgorthy@microsoft.com",
                                    "CreatedByType": "User",
                                    "CreatedAt": "2022-08-07T04:12:51.7463424Z",
                                    "LastModifiedBy": "jaredgorthy@microsoft.com",
                                    "LastModifiedByType": "User",
                                    "LastModifiedAt": "2022-08-08T00:52:45.0100913Z"
                                  }
Name                            : psNetworkManager
Etag                            :
Id                              : /subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b/resourceGroups/psResourceGroup/providers/Microsoft.Network/networkManagers/psNetworkManager

更新网络管理器范围访问权限。

参数

-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

网络管理器

类型:PSNetworkManager
Position:Named
默认值:None
必需:True
接受管道输入:True
接受通配符:False

-WhatIf

显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。

类型:SwitchParameter
别名:wi
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

String

PSNetworkManager

输出

PSNetworkManager