How to run start up scripts on my Azure VM even if a RDP session is not opened

Benoy Mammen Mathew 20 Reputation points
2023-09-27T04:15:21.6533333+00:00

I have created a virtual machine which runs a python script on system startup.

I have also created an Azure Logic App which starts and deallocates virtual machines on a schedule.

Ideally I would like to start a RDP or any other session, once the virtual machine starts.

How to open a session to your azure VM using Logic Apps?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,767 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,341 Reputation points MVP
    2023-09-27T04:59:59.75+00:00

    Hello @Benoy Mammen Mathew

    Unfortunately you cannot start RDP session to your Windows VM using Logic Apps.
    You can connect to Windows VM using Logic App + Powershell + WinRM
    https://learn.microsoft.com/en-us/powershell/module/microsoft.wsman.management/connect-wsman?view=powershell-7.3
    https://stackoverflow.com/questions/53414671/azure-logic-apps-how-to-run-powershell-script-or-azure-cli

    I believe that you only need to run Python script on Windows VM starup.
    You can achieve it multiple ways:


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.