When working on Windows, I had a problem with being unable to delete a file because it was being used by another process. Okay, but I really needed to delete that file, so how could I do that? Ideally, I could just run some PowerShell commands to identify which process was using the file, but I could not find such commands. So, I resorted to downloading a great Process Explorer utility by Mark Russinovich, then using that to find the culprit process and terminate it. The method on how to do that is documented here:
20190829/DuckDuckGo windows unlock file
20190829/https://www.howtogeek.com/128680/HOW-TO-DELETE-MOVE-OR-RENAME-LOCKED-FILES-IN-WINDOWS/
20190829/https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
Unfortunately, I also needed to do this is a restricted computer environment, on a minimal Windows core installation that did not have a web browser. Okay, so I can download a file in PowerShell. But additionally, I needed to do this behind a firewall, and with custom security certificates. In the end, I simply disabled security certificates, which can be done using this command:
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}