Azure Windows VM Automatically Deleting Files

Andrew J 21 Reputation points
2022-03-01T14:30:33.083+00:00

I have a new Windows 2022 VM in Azure. I have created a partition, F. I have batch files (.bat) and PowerShell (.ps1) on the root of this F partition that are used as part of Task Schedule jobs. I have noticed these batch and PowerShell files are automatically being deleted (not daily, perhaps weekly, it's a new VM so there's not much history). I understand this is expected behavior for the Temporary Storage (D) drive, but am not sure why it's happening on my own drive (F). Any ideas what's going on?

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

Accepted answer
  1. Michael Taylor 60,161 Reputation points
    2022-03-01T15:08:50.593+00:00

    Azure shouldn't delete files from a partition you created yourself. I wonder if something else is deleting them. This is especially true if the disk itself is still present then it definitely isn't temp storage as temp storage would be recreated from scratch including the partition and drive. The disk is created in whatever resource group you told it to create so you could verify it is still there when you see the files deleted to confirm.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.