CmdID

CmdID / PowerShell / Cmdlets / New

New-FileCatalog

Creates a Windows catalog file containing cryptographic hashes for files and folders in the specified paths. PowerShell reference

From the PowerShell reference 5 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Creates a Windows catalog file containing cryptographic hashes for files and folders in the specified paths. New-FileCatalog creates a Windows catalog file for a set of folders and files. This catalog file contains hashes for all files in the provided paths. Users can then distribute the catalog with their files so that users can validate whether any changes have been made to the folders since catalog creation time. Catalog versions 1 and 2 are supported. Version 1 uses the (deprecated) SHA1 hashing algorithm to create file hashes, and version 2 uses SHA256. IMPORTANT: SHA1-based catalogs are deprecated and shouldn't be trusted for security-sensitive workflows.

New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Create a file catalog for Microsoft.PowerShell.Utility

$newFileCatalogSplat = @{ Path = "$PSHOME\Modules\Microsoft.PowerShell.Utility" CatalogFilePath = '\temp\Microsoft.PowerShell.Utility.cat' CatalogVersion = 2.0 } New-FileCatalog @newFileCatalogSplatIdentify

Its page in the reference: New-FileCatalog.

Parameters

5 in the PowerShell reference
-CatalogFilePathThe location and name of the catalog file (.cat) you are creating. If you specify only a folder path, the command creates a file named catalog.cat in that location.
-CatalogVersionIMPORTANT: Version 1.0 (SHA1-based) catalogs are deprecated and shouldn't be trusted for security-sensitive workflows.
-PathIMPORTANT: When you provide a list of files or folders, the cmdlet can't compute a relative path since the files and folders can be anywhere on the filesystem. Under this condition, the cmdlet only uses the filename for the hash, which means that you can't have duplicate filenames in different paths. For the best results, pass in a single folder and let the cmdlet enumerate the contents. The cmdlet uses that initial path to calculate relative paths so that duplicate filenames are still unique within the folder tree.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.