Redigera

Dela via


Get-AzBatchRemoteLoginSetting

Gets remote logon settings for a compute node.

Syntax

Get-AzBatchRemoteLoginSetting
   [-PoolId] <String>
   [-ComputeNodeId] <String>
   -BatchContext <BatchAccountContext>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
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.

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-AzBatchComputeNode 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:AzContext, 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

BatchAccountContext

Outputs

PSRemoteLoginSettings