< Back

Get-AzureRemoteDesktopFile

Wed Jan 30, 2019 5:44 pm

NAME Get-AzureRemoteDesktopFile



SYNOPSIS

Gets an RDP file for an Azure virtual machine.





SYNTAX

Get-AzureRemoteDesktopFile [-ServiceName] <String> [-Name] <String> [-LocalPath] <String> [-Launch] [-Profile <AzureSMProfile>] [-InformationAction

<ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]





DESCRIPTION

The Get-AzureRemoteDesktopFile cmdlet downloads and saves a remote desktop connection (RDP) file for an Azure virtual machine. The cmdlet can launch a

remote desktop connection to the specified virtual machine.





PARAMETERS

-Name <String>

Specifies the virtual machine for which this cmdlet downloads an RDP file.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-LocalPath <String>

Specifies the full path of the downloaded RDP file on the local computer.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServiceName <String>

Specifies the name of the Azure service to which the virtual machine belongs.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Launch [<SwitchParameter>]

Indicates that this cmdlet starts a remote desktop session to the virtual machine.



Required? true

Position? 3

Default value False

Accept pipeline input? False

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Get an RDP file --------------------------



PS C:\\>Get-AzureRemoteDesktopFile -ServiceName "ContosoService" -Name "VirtualMachine07" -LocalPath "C:\\temp\\VirtualMachine07.rdp"



This command gets an RDP file for the VirtualMachine07 virtual machine named VirtualMachine07 that runs on the service named ContosoService. The command

stores that file as C:\\temp\\VirtualMachine07.rdp.

-------------------------- Example 2: Start a remote session --------------------------



PS C:\\>Get-AzureRemoteDesktopFile -ServiceName "ContosoService" -Name "VirtualMachine07" -Launch



This command gets an RDP file for the VirtualMachine07 virtual machine named VirtualMachine07 that runs on the service named ContosoService. The command

launches a remote desktop session. The command deletes the RDP file when the connection is closed.



RELATED LINKS