Add-DataGatewayCluster
在计算机上安装网关后,创建新的数据网关群集
语法
Default (默认值)
Add-DataGatewayCluster
-RecoveryKey <SecureString>
-GatewayName <String>
[-RegionKey <String>]
[-OverwriteExistingGateway]
[<CommonParameters>]
说明
在计算机上安装网关后,创建新的数据网关群集
示例
示例 1
PS C:\> Add-DataGatewayCluster -Name "MyNewGateway" -RecoveryKey (Read-Host "Enter Recovery Key" -AsSecureString)
创建名为 “MyNewGateway” 的新网关。
示例 2
PS C:\> ConvertFrom-SecureString -SecureString (Read-Host "Enter Recovery Key" -AsSecureString) | Out-File -FilePath .\encryptedRecoveryKey.txt
PS C:\> $secureRecoveryKey = (cat .\encryptedRecoveryKey.txt | ConvertTo-SecureString)
PS C:\> Add-DataGatewayCluster -RecoveryKey $secureRecoveryKey -Name "MyNewGateway" -RegionKey brazilsouth
在巴西南部区域创建一个名为“MyNewGateway”的新网关。 您可以将加密的恢复密钥安全地存储在文件中,并将其传递到 Add-DataGatewayCluster 中,而无需任何用户交互。
示例 3
PS C:\> ConvertFrom-SecureString -SecureString (Read-Host "Enter Recovery Key" -AsSecureString) | Out-File -FilePath .\encryptedRecoveryKey.txt
PS C:\> $secureRecoveryKey = (cat .\encryptedRecoveryKey.txt | ConvertTo-SecureString)
PS C:\> Add-DataGatewayCluster -RecoveryKey $secureRecoveryKey -Name "MyNewGateway" -RegionKey brazilsouth -OverwriteExistingGateway
在巴西南部区域创建一个名为“MyNewGateway”的新网关,并覆盖该本地计算机上现有的网关配置并配置新网关配置。 您可以将加密的恢复密钥安全地存储在文件中,并将其传递到 Add-DataGatewayCluster 中,而无需任何用户交互。
参数
-GatewayName
这是将要创建的网关群集的名称。 它不能与同一租户上的任何现有网关冲突。
参数属性
| 类型: | String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 名称 |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-OverwriteExistingGateway
设置此参数后,它将覆盖本地计算机上的现有网关配置并配置新的网关配置。 被覆盖的网关仍可在另一台计算机上恢复。
参数属性
| 类型: | SwitchParameter |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-RecoveryKey
网关使用恢复密钥来加密/解密本地凭证。 还原网关或向网关群集添加新成员也需要这样做。
参数属性
| 类型: | SecureString |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-RegionKey
此参数指示与您的网关关联的 Azure 区域。 如果未提供 RegionKey,则使用租户的默认 Power BI 区域。
若要获取可用区域参数的列表, Get-DataGatewayRegion 请运行 cmdlet
参数属性
| 类型: | 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。
输入
None
输出
System.Void
备注
此命令必须使用基于用户的凭证运行。