Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement