Edit

Share via


Get-AzBatchRemoteLoginSetting

Gets remote logon settings for a compute node.

Syntax

Id (Default)

Get-AzBatchRemoteLoginSetting
    [-PoolId] <String>
    [-ComputeNodeId] <String>
    -BatchContext <BatchAccountContext>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

InputObject

Get-AzBatchRemoteLoginSetting
    [[-ComputeNode] <PSComputeNode>]
    -BatchContext <BatchAccountContext>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzBatchRemoteLoginSetting 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

$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

The first command gets a batch account context that contains access keys for your subscription by using Get-AzBatchAccountKey. 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-AzBatchComputeNode. 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

$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"
Get-AzBatchRemoteLoginSetting -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-AzBatchAccountKey cmdlet.

Parameter properties

Type:BatchAccountContext
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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-AzBatchComputeNode cmdlet.

Parameter properties

Type:PSComputeNode
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Id
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PoolId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Id
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSComputeNode

BatchAccountContext

Outputs

PSRemoteLoginSettings