Get-AzureBatchRemoteLoginSettings

Gets remote logon settings for a compute node.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Get-AzureBatchRemoteLoginSettings
   [-PoolId] <String>
   [-ComputeNodeId] <String>
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureBatchRemoteLoginSettings
   [[-ComputeNode] <PSComputeNode>]
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureBatchRemoteLoginSettings cmdlet gets remote logon settings for a compute node in a virtual machines infrastructure-based pool.

Examples

Example 1: Get remote logon settings for all nodes in a pool

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

The first command gets a batch account context that contains access keys for your subscription by using Get-AzureRmBatchAccountKeys. The command stores the context in the $Context variable to use in the next command. The second command gets each compute node in the pool that has the ID ContosoPool by using Get-AzureBatchComputeNode. The command passes each computer node to the current cmdlet by using the pipeline operator. The command gets the remote logon settings for each compute node.

Example 2: Get remote logon settings for a node

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

The first command gets a batch account context that contains access keys for your subscription, and then stores it in the $Context variable. The second command gets the remote logon settings for the compute node that has the specified ID in the pool that has the ID ContosoPool.

Parameters

-BatchContext

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. To obtain a BatchAccountContext that contains access keys for your subscription, use the Get-AzureRmBatchAccountKeys cmdlet.

Type:BatchAccountContext
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ComputeNode

Specifies a compute node, as a PSComputeNode object, for which this cmdlet gets remote logon settings. To obtain a compute node object, use the Get-AzureBatchComputeNode cmdlet.

Type:PSComputeNode
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ComputeNodeId

Specifies the ID of the compute node for which to get the remote logon settings. for which this cmdlet gets remote logon settings.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PoolId

Specifies the ID of the pool that contains the virtual machine.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSComputeNode

Parameters: ComputeNode (ByValue)

BatchAccountContext

Parameters: BatchContext (ByValue)

Outputs

PSRemoteLoginSettings