Steps to reproduce
Using Get-WinEvent to parse an event tracing log (ETL) file causing the file to get locked past the point of use.
Get-WinEvent -Path testfile.etl -Oldest
Remove-Item -Force testfile.etl
Expected behavior
Testfile.etl should be deleted
Actual behavior
Produces an error that the file cannot be removed because it is being used by another process. Closing PowerShell is the only way to release the lock and then delete the file.
Environment data
Name Value
---- -----
PSVersion 5.0.10586.117
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.117
CLRVersion 4.0.30319.17929
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Steps to reproduce
Using
Get-WinEventto parse an event tracing log (ETL) file causing the file to get locked past the point of use.Expected behavior
Actual behavior
Environment data