Powershell Get-FileMetaData 无法识别

Powershell Get-FileMetaData not recognized

我正在尝试使用 PowerShell 命令 'Get-FileMetaData' 但是 PowerShell ISE 输出以下错误:

Get-FileMetaData : The term 'Get-FileMetaData' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path 
was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-FileMetaData E:\Test_Output
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-FileMetaData:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

路径是正确的,我也尝试了各种现有的路径。我找不到关于这个命令需要什么版本的任何信息,但是使用 $PSVersionTable.PSVersion 输出状态 'Major 5' 所以我相信我使用的是 PS v5.

有其他人对此命令有疑问吗?我发现各种论坛都提到了它的功能,但找不到太多关于故障排除的信息。

感谢您的帮助!

这不是核心 PowerShell cmdlet,因此我预计大多数人都会失败。据我所知来自Script Gallery。您需要先下载它。

因此,如果您想要加载该模块,则需要手动或自动导入该模块。

You can read more about module loading on MSDN

使用免费工具'exiftool'我已经整理了以下脚本:

$creator = C:\Windows\exiftool.exe "-Creator" $Image.FullName

这允许 $creator 成为文件创建者,在我们的生产图像的情况下,它与作者相同。