I am trying to read a log file using Get-Content so I can keep track of the progress of the application that is creating the file. Unfortunately PowerShell gives me the following error message: “The process cannot access the file ‘[FileName]’ because it is being used by another process.”
Apparently the process that is creating the file is still writing to the file, essentially blocking all access to the file. With some other applications it works to copy/paste the file to a new file, but this doesn’t work in this case.
Is there a way to read files that are in use by other processes? Opening the file in Read-Only mode is no problem.