Azure: I installed an antivirus program on the virtual machine by mistake. Now I can not connect to the VM.

Dale Stolman 0 Reputation points
2023-08-16T17:44:52.23+00:00

Azure: I installed an antivirus program on the virtual machine by mistake. Now I can not connect to the VM. Is there a way to restart VM without Virus program starting?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,682 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Javier Villegas 900 Reputation points MVP
    2023-08-16T17:52:16.26+00:00

    I believe you are trying to connect via RDP and probably the AV is blocking the port

    Try using Bastion

    0 comments No comments

  2. TP 116.5K Reputation points
    2023-08-16T17:58:13.1633333+00:00

    Hi Dale,

    You can run custom Powershell scripts as well as run other commands via the portal. Navigate to the VM -- Operations -- Run command.

    As to exactly what commands to run, that is hard for me to say without knowing precisely what changes the antivirus made to the VM as well as what functionality it has. What you could do is create a test VM on your local PC (using client Hyper-v), install the antivirus, then sign in to the VM and test what commands are needed to undo/fix things.

    For example, you might just need to run a powershell command to re-enable Remote Desktop, or perhaps a powershell command to uninstall the antivirus and restart. You can test each idea you have on the local VM before trying it on the Azure VM.

    Probably a good idea to back up your Azure VM before trying to fix it.

    Please click Accept Answer if the above was useful. Add a comment if you would like something clarified or you want feedback on a specific idea.

    Thanks.

    -TP


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.