Created
August 17, 2016 21:57
-
-
Save JeremyMorgan/28271d520788efd92dedd2675b4c5fe6 to your computer and use it in GitHub Desktop.
Enable Remote Desktop in Azure
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
#ConvertTo-SecureString -String "yourpassword" -AsPlainText -Force | ConvertFrom-SecureString | Set-Content "password.txt" | |
$servicename = "yourcloudservice" | |
$username = "remotedesktopuser" | |
$securepassword = Get-Content -Path "password.txt" | ConvertTo-SecureString | |
$expiry = $(Get-Date).AddDays(1) | |
$credential = New-Object System.Management.Automation.PSCredential $username,$securepassword | |
Set-AzureServiceRemoteDesktopExtension -ServiceName $servicename -Credential $credential -Expiration $expiry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment