< Back

Get-AzureBatchRemoteDesktopProtocolFile

Tue Jan 29, 2019 9:35 pm

NAME Get-AzureBatchRemoteDesktopProtocolFile



SYNOPSIS

Gets an RDP file from a compute node.





SYNTAX

Get-AzureBatchRemoteDesktopProtocolFile [[-ComputeNode] <PSComputeNode>] -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] -DestinationPath <String> [<CommonParameters>]



Get-AzureBatchRemoteDesktopProtocolFile [[-ComputeNode] <PSComputeNode>] -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] -DestinationStream <Stream> [<CommonParameters>]



Get-AzureBatchRemoteDesktopProtocolFile [-PoolId] <String> [-ComputeNodeId] <String> -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] -DestinationPath <String> [<CommonParameters>]



Get-AzureBatchRemoteDesktopProtocolFile [-PoolId] <String> [-ComputeNodeId] <String> -BatchContext <BatchAccountContext> [-DefaultProfile

<IAzureContextContainer>] -DestinationStream <Stream> [<CommonParameters>]





DESCRIPTION

The Get-AzureBatchRemoteDesktopProtocolFile cmdlet gets a Remote Desktop Protocol (RDP) file from a compute node and saves it as a file or to a

user supplied stream.





PARAMETERS

-BatchContext <BatchAccountContext>

Specifies the BatchAccountContext instance that this cmdlet uses to interact with the Batch service. If you use the Get-AzureRmBatchAccount

cmdlet to get your BatchAccountContext, then Azure Active Directory authentication will be used when interacting with the Batch service. To

use shared key authentication instead, use the Get-AzureRmBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys

populated. When using shared key authentication, the primary access key is used by default. To change the key to use, set the

BatchAccountContext.KeyInUse property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ComputeNode <PSComputeNode>

Specifies a compute node, as a PSComputeNode object, to which the .rdp file points. To obtain a compute node object, use the

Get-AzureBatchComputeNode cmdlet.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ComputeNodeId <String>

Specifies the ID of the compute node to which the .rdp file points.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DestinationPath <String>

Specifies the file path where this cmdlet saves the .rdp file.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DestinationStream <Stream>

Specifies the stream into which this cmdlet directs the RDP data. This cmdlet does not close or rewind this stream.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PoolId <String>

Specifies the ID of the pool that contains the compute node from which this cmdlet gets an .rdp file.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

BatchAccountContext

Parameter 'BatchContext' accepts value of type 'BatchAccountContext' from the pipeline



PSComputeNode

Parameter 'ComputeNode' accepts value of type 'PSComputeNode' from the pipeline





OUTPUTS



NOTES









Example 1: Get an RDP file from a specified compute node and save the file



PS C:\\>Get-AzureBatchRemoteDesktopProtocolFile -PoolId "Pool06" -ComputeNodeId "ComputeNode01" -DestinationPath "C:\\PowerShell\\ComputeNode01.rdp"

-BatchContext $Context



This command gets an RDP file from the compute node that has the ID ComputeNode01 in the pool that has the ID Pool06. The command saves the .rdp

file as C:\\PowerShell\\MyComputeNode.rdp. Use the Get-AzureRmBatchAccountKeys cmdlet to assign a context to the $Context variable.





Example 2: Get an RDP file from a compute node and save the file by using the pipeline



PS C:\\>Get-AzureBatchComputeNode -PoolId "Pool06" -Id "ComputeNode02" -BatchContext $Context | Get-AzureBatchRemoteDesktopProtocolFile

-DestinationPath "C:\\PowerShell\\MyComputeNode02.rdp" -BatchContext $Context



This command gets the compute node that has the ID ComputeNode02 in the pool that has the ID Pool06. The command passes that compute node to the

current cmdlet by using the pipeline operator. The current cmdlet gets an .rpd file from the compute node, and then saves the contents as a file

that is named C:\\PowerShell\\MyComputeNode02.rdp.





Example 3: Get a RDP file from a specified compute node and direct it to a stream



PS C:\\>$Stream = New-Object -TypeName "System.IO.MemoryStream"

PS C:\\> Get-AzureBatchRemoteDesktopProtocolFile "Pool06" -ComputeNodeId "ComputeNode03" -DestinationStream $Stream -BatchContext $Context



The first command creates a stream by using the New-Object cmdlet, and then stores it in the $Stream variable.



The second command gets an .rdp file from the compute node that has the ID ComputeNode03 in the pool that has the ID Pool06. The command directs

file contents to the stream in $Stream.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... otocolfile

Get-AzureRmBatchAccountKeys

Get-AzureBatchComputeNode

Azure Batch Cmdlets