![](/img/trans.png)
[英]Same file, different hashes with PowerShell Get-FileHash command
[英]Get-FileHash command in powershell 2.0
我们可以在 powershell 2.0 中运行 Get-FileHash 命令吗?
我们可以在 powershell 5.0 中使用 Get-FileHash,但在 powershell 2.0 中无法使用。 我们如何解决这个问题,让 Get-FileHash 在 2.0 中工作? 如果让 Get-HashFile 命令在 powershell 2.0 中运行,我们会收到以下错误:
Get-HashFile "C:*.iso" -算法 SHA384 | 格式列表错误:术语“Get-FileHash”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称
Get-FileHash 在 V2 中不可用。
您也可以尝试在 Powershell V2 中使用 Get-FileHash 的某些端口,例如 GetHash。 以下是相同的链接:
https://gist.github.com/jaredcatkinson/7d561b553a04501238f8e4f061f112b7
Get-Hash 是 Get-FileHash 的 PowerShell 版本 2 端口,支持散列文件和字符串。 这是用于计算散列的实际项目。 此值将支持 [Byte[]] 或 [System.IO.Stream] 对象。 指定要散列的文件的路径。
https://gist.github.com/stvnrs/aefcabe16dc3f69f328ed0c16e0b81cb
让我知道这些是否有效。
如果答案对您有用,请不要忘记将其标记为已接受。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.