Share this post:This blog post is part of an ongoing series by Adam Gordon. Adam will show you how to use each PowerShell command each week. Adam will be covering New-FileCatalog this week.
When should you use New-FileCatalog
New-FileCatalog creates an Windows catalog file for a specific set of files and folders. This catalog file contains hashes of all files within the specified paths. The catalog file can be distributed to users along with their files, so that they can verify whether any changes have occurred since catalog creation.
NOTE: Catalog versions 1 & 2 are supported. Version 1 uses the deprecated SHA1 hashing algorithm for creating file hashes. Version 2 uses SHA256. Windows Server 2008 R2 and Windows 7 do not support catalog version 2. Catalog version 2 is not supported on Windows Server 2008 R2 or Windows 7.
What version of PowerShell do I use?
Get the PowerShell Version for your machine
This command displays the PowerShell version information for your machine.
How do I use New-FileCatalog
Create a file catalog for Microsoft.PowerShell.Utility:
New-FileCatalog -Path $PSHOME\Modules\Microsoft.PowerShell.Utility -CatalogFilePath \temp\Microsoft.PowerShell.Utility.cat -CatalogVersion 2.0
Learn the command for last week: Add-Content.
Do you need PowerShell training? ITProTV offers PowerShell online IT training courses.