Created
July 14, 2015 15:26
-
-
Save ploegert/0e80f2035147677a9370 to your computer and use it in GitHub Desktop.
ACQUIRING REMOTE ACCESS TO OUR VM Since we know the name of your VM we can simply use Azure SDK cmdlets to get RDP file and kick off a remote access to it. See Azure Powershell SDK documentation for more information. src: http://blogs.msdn.com/b/powershell/archive/2014/08/07/introducing-the-azure-powershell-dsc-desired-state-configuration-extens…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $vm = Get-AzureVM –ServiceName "example-1-svc" –Name "example-1" | |
| $rdp = Get-AzureEndpoint -Name "RDP" -VM $vm | |
| $hostdns = (New-Object "System.Uri" $vm.DNSName).Authority | |
| $port = $rdp.Port | |
| Start-Process "mstsc" -ArgumentList "/V:$hostdns`:$port /w:1024 /h:768 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment