Webinar: PKI Insights - Energy Utility PKI Cybersecurity in Critical Infrastructure (CIP) Environments by PKI Solutions

PowerShell File Checksum Integrity Verifier

Go to GitHub
Schedule a Demo

Description

PsFCIV is a PowerShell-native opensource implementation of Microsoft-discontinued File Checksum Integrity Verifier (FCIV). 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.

 

Details & Pricing

  • This tool is distributed for free via source code on GitHub or binary download
  • Support is not commercially provided at this time, however, we do accept comments, suggestions, and notifications of compatibility on GitHub.

 

Module Requirements

  • Windows PowerShell 3.0 or higher
  • .NET Framework 4.0 or higher

Release notes

Version 1.0 (current)

Installation

Option 1: The PsFCIV Module can be downloaded below or from the PowerShell Gallery

Option 2: In a PowerShell console by running the following command:

Install-Module -Name PsFCIV

Start guide:

Run Windows PowerShell and import PsFCIV into a current session:

Import-Module PsFCIV

Explore available commands:

Get-Command -Module PsFCIV

Currently, only Start-PsFCIV command is exposed.

Getting some help

If you don’t know how to use certain command and/or get help about certain parameters, examples you may run the following command:

# retrieve basic help
Get-Help Start-PsFCIV
# retrieve detailed and full help content
Get-Help Start-PsFCIV –Detailed
Get-Help Start-PsFCIV –Full
# retrieve help for particular parameter:
Get-Help Start-PsFCIV –Parameter ParameterName
# retrieve command usage examples:
Get-Help Start-PsFCIV –Examples 

 

Module removal

If you wish to remove module from current PowerShell session run the following command:

Remove-Module PsFCIV

However this command just unload module from a current session. You may re-load it by using Import-Module command.
To completely remove module from the system, uninstall installation package:

Uninstall-Module PsFCIV

Examples

Start-PsFCIV -Path C:\tmp -XML DB.XML

Checks 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 -Recurse

Checks 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 SHA512

Checks all TXT files in C:\tmp folder by using SHA512 hash algorithm.

Start-PsFCIV -Path C:\tmp -XML DB.XML -Rebuild

Rebuilds 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 Rename

Checks 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, Bad

Checks 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, SHA384

Performs a runtime recursive file hash calculation using SHA1, SHA256 and SHA384 hash algorithm.