Set-DataGatewayInstaller
修改可在组织中安装和注册新网关的用户列表,需要以租户管理员身份登录才能运行此命令。
语法
Default (默认值)
Set-DataGatewayInstaller
[-PrincipalObjectIds <String[]>]
-Operation <OperationType>
-GatewayType <GatewayType>
[<CommonParameters>]
说明
设置哪些用户可以在组织中安装和注册新网关。
示例
示例 1
PS C:\> $user1 = $(Get-AzADUser -ObjectId "testUpn@tenant.com").Id
PS C:\> $user2 = $(Get-AzADUser -ObjectId "testUpn@tenant.com").Id
PS C:\> Set-DataGatewayInstaller -PrincipalObjectIds $user1,$user2 -Operation Add -GatewayType Resource
允许用户 testUpn1@tenant.com,testUpn2@tenant.com 以标准模式注册和安装本地数据网关。
示例 2
PS C:\> $user1 = $(Get-AzADUser -ObjectId "testUpn@tenant.com").Id
PS C:\> $user2 = $(Get-AzADUser -ObjectId "testUpn@tenant.com").Id
PS C:\> Set-DataGatewayInstaller -PrincipalObjectIds $user1,$user2 -Operation Remove -GatewayType Resource
用户 testUpn1@tenant.com,并且不再允许 testUpn2@tenant.com 在标准模式下注册和安装本地数据网关。
参数
-GatewayType
该命令的网关类型生效。 下面的值 Resource 意味着在标准模式下运行的本地数据网关。
参数属性
| 类型: | GatewayType |
| 默认值: | None |
| 接受的值: | Resource, Personal, VirtualNetwork |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Operation
要为指定用户执行的操作。
参数属性
| 类型: | OperationType |
| 默认值: | None |
| 接受的值: | None, Add, Remove |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-PrincipalObjectIds
可在组织中配置网关的 Azure Active Directory 主体对象 ID(即用户 ID)列表。
参数属性
| 类型: | String[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 用户 |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。