The module replaces and enhances discontinued Microsoft's File Checksum Integrity Verifier (FCIV) which is intended to monitor file share integrity. PsFCIV is two-way compatible with FCIV database format, thus transition from FCIV doesn't require any efforts. PsFCIV includes the following features:
- Include or exclude sub-folders, choose algorithms, and direct output.
- The utility can hash single files, folders, or recursively, large folder structures.
- The hash algorithms available are MD5, SHA1 and SHA2 algorithm family. Multiple hashes can be calculated for every file.
- Adds custom actions for bad (tampered) files: rename or delete file
- Enhanced verbose and debug logging
- PsFCIV includes the following working modes:
- New -- creates a new XML database for file share
- Check -- checks file share against database for integrity
- FCIV -- migrates FCIV database to PsFCIV format.
- Rebuild -- adds new files to database and removes no longer existing files from database. This mode doesn't check existing files.
- Online -- performs one-time hash calculation without creating a database file.
PsFCIV is licensed under Microsoft Public License (Ms-PL) license
The PsFCIV module is installed from PowerShell Gallery:
Install-Module -Name PsFCIVImport module:
Import-Module PsFCIVGet command help:
Get-Help Start-PsFCIVStart-PsFCIV -Path C:\tmp -XML DB.XMLChecks all files in C:\tmp folder by using SHA1 hash algorithm and compares them with information stored in the DB.XML database.
Start-PsFCIV -Path C:\tmp -XML DB.XML -HashAlgorithm SHA1, SHA256, SHA512 -RecurseChecks all files in C:\tmp folder and subfolders by using SHA1, SHA256 and SHA512 algorithms.
Start-PsFCIV -Path C:\tmp -Include *.txt -XML DB.XML -HashAlgorithm SHA512Checks all TXT files in C:\tmp folder by using SHA512 hash algorithm.
Start-PsFCIV -Path C:\tmp -XML DB.XML -RebuildRebuilds DB file, by removing all unused entries (when an entry exists, but the file does not exist) from the XML file and add all new files that has no records in the XML file using SHA1 algorithm. Existing files are not checked for integrity consistence.
Start-PsFCIV -Path C:\tmp -XML DB.XML -HashAlgorithm SHA256 -Action RenameChecks all files in C:\tmp folder using SHA256 algorithm and renames files with Length, LastWriteTime or hash mismatch by adding .BAD extension to them. The 'Delete' action can be appended to delete all bad files.
Start-PsFCIV -Path C:\tmp -XML DB.XML -Show Ok, BadChecks all files in C:\tmp folder using SHA1 algorithm and shows filenames that match Ok or Bad category.
Start-PsFCIV -Path C:\tmp -Recurse -Online -HashAlgorithm SHA1, SHA256, SHA384Performs a runtime recursive file hash calculation using SHA1, SHA256 and SHA384 hash algorithm.