For system, network and cloud administrators
I wanted to schedule turning off/shutting down Windows processes/applications because as time passes during my day at my computer, I open more and more applications and they get crowded in my workspace. This is why, I decided to create a PowerShell script that I would execute as soon as I’ve opened my computer. A form of a scheduler that stops applications while I’m working at my computer.
And the script is a pretty easy one. Basically, the script consists of 2 commands: one command that tells the script to “wait” X seconds and a 2nd command that will actually stop/shutdown the Windows process/application that you need.
At some point in life, I needed to delete a folder and all of its files. But I wasn’t able to. The ordinary Delete key or Shift + Delete wouldn’t delete them. Not even when entering in “Command Prompt” – the error I was receiving was “The process cannot access the file because it is being used by another process.”