你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureBatchRemoteLoginSettings
获取计算节点的远程登录设置。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureBatchRemoteLoginSettings
[-PoolId] <String>
[-ComputeNodeId] <String>
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureBatchRemoteLoginSettings
[[-ComputeNode] <PSComputeNode>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureBatchRemoteLogin设置 cmdlet 获取基于基础结构的池中计算节点的远程登录设置。
示例
示例 1:获取池中所有节点的远程登录设置
PS C:\>$Context = Get-AzureRmBatchAccountKeys -AccountName "ContosoBatchAccount"
PS C:\> Get-AzureBatchComputeNode -PoolId "ContosoPool" -BatchContext $Context | Get-AzureBatchRemoteLoginSettings -BatchContext $Context
IPAddress Port
--------- ----
10.214.75.221 50002
10.214.75.221 50001
10.214.75.221 50000
第一个命令使用 Get-AzureRmBatchAccountKeys 获取包含订阅访问密钥的批处理帐户上下文。 该命令将上下文存储在下一个命令中使用的$Context变量中。 第二个命令使用 Get-AzureBatchComputeNode 获取池中 ID 为 ContosoPool 的每个计算节点。 该命令使用管道运算符将每台计算机节点传递到当前 cmdlet。 该命令获取每个计算节点的远程登录设置。
示例 2:获取节点的远程登录设置
PS C:\>$Context = Get-AzureRmBatchAccountKeys -AccountName "ContosoBatchAccount"
PS C:\> Get-AzureBatchRemoteLoginSettings -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-AzureRmBatchAccountKeys cmdlet。
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeNode
将计算节点指定为 PSComputeNode 对象,此 cmdlet 会获取远程登录设置。 若要获取计算节点对象,请使用 Get-AzureBatchComputeNode 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: | 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 |
输入
参数:ComputeNode (ByValue)
参数:BatchContext (ByValue)