locked
Cant connect to azure VM RRS feed

  • Question

  • How to enable remote access to azure vm if it is disable mistakenly in system properties

    NOw I am not getting any pop up to enter user name and password
     

    Please help me regarding this

    Thanks alot

    Wednesday, December 28, 2016 8:23 AM

Answers

  • Hi,

    According to your description, we can use portal to install Custom Script Extension to run script to enable RDP:

    We should create a script named “script.ps1”and upload the script to Azure. This is my script:

    # Enable Remote Desktop

    (Get-WmiObject Win32_TerminalServiceSetting -Namespace root\cimv2\TerminalServices).SetAllowTsConnections(1,1) | Out-Null
    (Get-WmiObject -Class "Win32_TSGeneralSetting" -Namespace root\cimv2\TerminalServices -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0) | Out-Null
    Get-NetFirewallRule -DisplayName "Remote Desktop*" | Set-NetFirewallRule -enabled true

    We can use Azure portal to install Custom Script Extension:

    Here is the extension’s result:

    If you still have questions, welcome to post back here. 

    Best Regards,

    Jason



    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 28, 2016 9:00 AM

All replies

  • How to enable remote access to azure vm if it is disable mistakenly in system properties

    NOw I am not getting any pop up to enter user name and password
     

    Please help me regarding this

    Thanks alot

    • Merged by Monika chaudhary Wednesday, December 28, 2016 8:36 AM same cx ,same issue
    Wednesday, December 28, 2016 8:22 AM
  • Hi,

    According to your description, we can use portal to install Custom Script Extension to run script to enable RDP:

    We should create a script named “script.ps1”and upload the script to Azure. This is my script:

    # Enable Remote Desktop

    (Get-WmiObject Win32_TerminalServiceSetting -Namespace root\cimv2\TerminalServices).SetAllowTsConnections(1,1) | Out-Null
    (Get-WmiObject -Class "Win32_TSGeneralSetting" -Namespace root\cimv2\TerminalServices -Filter "TerminalName='RDP-tcp'").SetUserAuthenticationRequired(0) | Out-Null
    Get-NetFirewallRule -DisplayName "Remote Desktop*" | Set-NetFirewallRule -enabled true

    We can use Azure portal to install Custom Script Extension:

    Here is the extension’s result:

    If you still have questions, welcome to post back here. 

    Best Regards,

    Jason



    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, December 28, 2016 9:00 AM
  • Thank you so much it worked but same thing I was doing with vmaccess agent using power shelll it was not working...but many thanks
    Wednesday, December 28, 2016 10:10 AM
  • Hi my vm always remote connection is not enabled

    and I am trying to use this script but it always get stuck in running state

    My Vm was running last time before I update the vm through powershell and incresae the size of my disk 0 through azure powershell

    what i can do to make it run again

    I am trying use this script , just uploading the script in custom extension

    Plerase help me out 

    Thanks

    Monday, March 27, 2017 6:42 AM
  • Up for u !
    MINH PHÁT LONG, chuyên thiết bị chống trộm cho xe máy an toàn, hiệu quả, tiết kiệm !!
    http://minhphatlong.com/san-pham/chong-trom-xe-may
    Monday, March 27, 2017 7:00 AM