Created
September 23, 2017 07:44
-
-
Save irwinwilliams/43e4038388576946489cdaad2501637d to your computer and use it in GitHub Desktop.
Change RDP settings on Azure Web Role
This file contains 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
#This works with a Classic Azure Cloud Service Web Role | |
$SubsciptionName = "<name>" | |
$CloudServiceName = "<web-role-name>" | |
Add-AzureAccount | |
Select-AzureSubscription -Name $SubscriptionName | |
Get-AzureRole -ServiceName $CloudServiceName | |
$username = "<username>" | |
$password = "<other-options-can-be-used>" | |
$securepassword = ConvertTo-SecureString -String $password -AsPlainText -Force | |
$expiry = $(Get-Date).AddDays(1) | |
$rdpcredential = New-Object System.Management.Automation.PSCredential $username,$securepassword | |
Set-AzureServiceRemoteDesktopExtension -ServiceName $CloudServiceName -Credential $rdpcredential -Expiration $expiry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment