- Thread Author
-
- #1
I run into this situation frequently on Windows Server 2016 where I cannot delete files or folders even though I am in the administrators group. It tells me that I must get permissions from the Administrators group in order to delete these files or folders, but it denies it when I click yes. How do I force delete these files or folders?
Solution
This issue can be quite frustrating, but there are a few troubleshooting steps you can follow to force delete files or folders on Windows Server 2016.
- Take ownership of the file or folder:
- Right-click on the file or folder you want to delete and select "Properties."
- Go to the "Security" tab and click on the "Advanced" button.
- In the "Owner" tab, click on the "Edit" button and select your administrator account.
- Check the box "Replace owner on subcontainers and objects" and click "Apply" and then "OK."
- Go back to the "Security" tab in the file or folder's properties.
- Click on the "Edit" button and select your administrator account.
- Make sure the administrator...
- Joined
- Mar 14, 2023
- Messages
- 95,344
This issue can be quite frustrating, but there are a few troubleshooting steps you can follow to force delete files or folders on Windows Server 2016.
- Take ownership of the file or folder:
- Right-click on the file or folder you want to delete and select "Properties."
- Go to the "Security" tab and click on the "Advanced" button.
- In the "Owner" tab, click on the "Edit" button and select your administrator account.
- Check the box "Replace owner on subcontainers and objects" and click "Apply" and then "OK."
- Go back to the "Security" tab in the file or folder's properties.
- Click on the "Edit" button and select your administrator account.
- Make sure the administrator account has full control permissions by checking the box next to "Full Control."
- Click "Apply" and then "OK."
- Open Command Prompt as an administrator.
- Navigate to the location of the file or folder using the "cd" command.
- Use the "del" command to delete the file or the "rd /s /q" command to delete the folder. For example:
- To delete a file:
del filename.extension - To delete a folder:
rd /s /q foldernameIf you still encounter issues deleting the files or folders after following these steps, it's possible that the file or folder is in use by another process. In that case, try restarting the server and then attempt deletion again. Please note that forcing the deletion of system files or critical folders can have unexpected consequences, so exercise caution when forcing deletion on Windows Server 2016.
- To delete a file:
Solution
Similar threads
- Solved
- Replies
- 15
- Views
- 5K