你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzBatchRemoteLoginSetting
获取计算节点的远程登录设置。
语法
Get-AzBatchRemoteLoginSetting
[-PoolId] <String>
[-ComputeNodeId] <String>
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchRemoteLoginSetting
[[-ComputeNode] <PSComputeNode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzBatchRemoteLoginSetting cmdlet 获取基于基础结构的池中计算节点的远程登录设置。
示例
示例 1:获取池中所有节点的远程登录设置
$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchComputeNode -PoolId "ContosoPool" -BatchContext $Context | Get-AzBatchRemoteLoginSetting -BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50002
10.214.75.221 50001
10.214.75.221 50000
第一个命令使用 Get-AzBatchAccountKey 获取包含订阅访问密钥的批处理帐户上下文。 该命令将上下文存储在下一个命令中使用的$Context变量中。 第二个命令使用 Get-AzBatchComputeNode 获取池中 ID 为 ContosoPool 的每个计算节点。 该命令使用管道运算符将每台计算机节点传递到当前 cmdlet。 该命令获取每个计算节点的远程登录设置。
示例 2:获取节点的远程登录设置
$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchRemoteLoginSetting -PoolId "ContosoPool" -ComputeNodeId "tvm-1900272697_1-20150330t205553z" -BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50000
第一个命令获取一个批处理帐户上下文,其中包含订阅的访问密钥,然后将其存储在$Context变量中。 第二个命令获取具有 ID ContosoPool 的池中具有指定 ID 的计算节点的远程登录设置。
参数
-BatchContext
指定 此 cmdlet 用于与 Batch 服务交互的 BatchAccountContext 实例。 若要获取 包含订阅访问密钥的 BatchAccountContext ,请使用 Get-AzBatchAccountKey cmdlet。
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeNode
将计算节点指定为 PSComputeNode 对象,此 cmdlet 会获取远程登录设置。 若要获取计算节点对象,请使用 Get-AzBatchComputeNode cmdlet。
Type: | PSComputeNode |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeNodeId
指定要为其获取远程登录设置的计算节点的 ID。 此 cmdlet 获取远程登录设置。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PoolId
指定包含虚拟机的池的 ID。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |