Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #This works with a Classic Azure Cloud Service Web Role
  2. $SubsciptionName = "<name>"
  3. $CloudServiceName = "<web-role-name>"
  4. Add-AzureAccount
  5. Select-AzureSubscription -Name $SubscriptionName
  6. Get-AzureRole -ServiceName $CloudServiceName
  7.  
  8. $username = "<username>"
  9. $password = "<other-options-can-be-used>"
  10. $securepassword = ConvertTo-SecureString -String $password -AsPlainText -Force
  11. $expiry = $(Get-Date).AddDays(1)
  12. $rdpcredential = New-Object System.Management.Automation.PSCredential $username,$securepassword
  13. Set-AzureServiceRemoteDesktopExtension -ServiceName $CloudServiceName -Credential $rdpcredential -Expiration $expiry
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement