2

I am interested in getting the 'Copyright' information field using the cmd or PowerShell. Manually, it can be accessed by

RighClick the executable -> Properties -> Details -> Copyright

I am aware of the wmic datafile command,

wmic datafile where Name="C:\Windows\System32\cmd.exe" get Manufacturer,Name,Version

but it does not give most of the detailed information from the Details tab in the file properties.

How do I get this info using cmd or PowerShell? I believe Python should be able to solve it easily, but sometimes it is not an option to install python on production server.

4

1 回答 1

5

Powershell 实际上在 VersionInfo 属性中为您提供了大量信息。

(Get-Item "C:\Windows\System32\cmd.exe").VersionInfo.LegalCopyright

如果您需要,这是一篇技术网文章,其中包含更多信息。
https://blogs.technet.microsoft.com/askpfeplat/2014/12/07/how-to-correctly-check-file-versions-with-powershell/

于 2018-03-13T17:34:07.067 回答