Skip to content

Get-FileHash Terminates at Corrupt File #11931

@jasonmull

Description

@jasonmull

When running a script to obtain the hashes of all files in a given directory, PS 7.0.0-rc.3 will terminate the command when it comes across a corrupt file. In PS 5.1, the same command will throw an error but continue generating hashes of additional files. The script I;m using to test is

get-childitem h:\ -Recurse -Force -File | Get-FileHash

In either version of Powershell, I get the error below. The only difference is that the script continues processing in 5.1 and terminates in 7.

Get-FileHash: The file or directory is corrupted and unreadable. : 'H:\Intel\gp\profile.dat'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions