Good morning William Jackson,
The problem stems from how FSRM interacts with the compound document structure of Office Open XML files (.docx, .xlsx, .pptx). These are essentially ZIP archives containing XML parts and binary components. When FSRM, or the PowerShell classifier, accesses the file to read its properties, the Windows Shell or the Office subsystem may automatically update internal metadata timestamps, such as the lastPrinted attribute or the ZIP container's directory modification timestamp, even when the file is merely read. This alters the file's binary composition, hence changing its cryptographic hash.
To achieve your goal of timestamping arrival without altering file integrity, you must abandon any method that requires opening the file itself. Instead, leverage the NTFS USN Change Journal, which logs file system events without modifying the files. You can create a scheduled PowerShell script that queries the USN Journal for USN_REASON_FILE_CREATE events on your evidence share. This script extracts the precise date/time a file was first written to the volume and writes this timestamp to a separate, secured database (e.g., SQLite or a dedicated SQL server). The file itself is never opened; only its MFT record is read.
Here is a simplified PowerShell example to capture file creation events:
powershell
$volume
You would then base your retention policy on this external log. For absolute integrity, combine this with a write-blocker at the hardware or driver level for the evidence volume, ensuring no process can modify the files. Furthermore, immediately upon file arrival, calculate and store the original hash in your external database. Your retention script can then compare current hashes against this record to detect any unauthorized changes.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to ACCEPT ANSWER then. Should you have more questions, feel free to leave a message. Have a nice day!
VPHAN