Converting the Windows Script Host VerifyFile Method
Definition: Verifies the digital signature encapsulated in a script.
VerifyFile
Here’s a case in which PowerShell goes one better than Windows Script Host: while WSH enables you to verify the digital signature attached to a Windows Script Host file, Windows PowerShell, and the Get-AuthenticodeSignature cmdlet, lets you verify the digital signature on any file. For example, this command checks the digital signature on the file Winword.exe (Microsoft Word):
Get-AuthenticodeSignature "C:\Program Files\Microsoft Office\OFFICE11\Winword.exe"
In turn, you should get back information similar to this:
SignerCertificate Status Path
----------------- ------ ----
D57FAC60F1A8D34877AEB350E83F46F6EFC9E5F1 Valid Winword.exe
See conversions of other Windows Script Host methods and properties.
Return to the VBScript to Windows PowerShell home page