Powershell表示使用get-filehash时找不到路径

rhi*_*use 2 powershell

首先,我的代码:

gci -Path C:\ -Recurse | select FullName | %{Get-FileHash $_}

gci -Path C:\ -Recurse | select FullName输出错误,但输出正确的路径.

我在这做错了什么?

Mar*_*ndl 5

Get-FileHash也需要一个,Path所以你可以将Get-ChildItemcmdlet传递给它:

gci -Path C:\ -Recurse | Get-FileHash
Run Code Online (Sandbox Code Playgroud)