locked
Signature timestamp RRS feed

  • Question

  • Hello Everyone,

    How can I retrieve Signing Time attribute (Timestamp) of the digital signature in PowerShell. Is this possible?

    Regards.

    Monday, April 18, 2011 2:07 PM

Answers

  • Set-AuthenticodeSignature has -TimeStampServer option, but people hardly use it (including myself) so I'm not sure where that info would show up in certificate information (I assume it would be a part of TimeStampCertificate property) and would it help much. I'm not 'signing expert', I only sign my scripts to be sure they were not modified by anybody else ;)

    To get info when script was signed: because Signing a script modifies it, and any attempt to modify it after that will cause an error, I guess it is save to assume that LastWriteTime property of file object will be good enough for checking date when script was signed.

    HTH
    Bartek

    Tuesday, May 10, 2011 5:36 AM

All replies

  • do you want to get the time when a powershell script was signed?

    -join("74686979616775313440686F746D61696C2E636F6D"-split"(?<=\G.{2})",21|%{[char][int]"0x$_"})
    http://www.myExchangeWorld.com
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, April 18, 2011 2:25 PM
  • You can get information on all code-signing certificates on a computer, including date created, with the following PowerShell command:

    Get-ChildItem cert:\CurrentUser\My -codesigning | Format-List

     

    To get the date a script was signed, perhaps you can use the Date Modified.

     


    Richard Mueller - MVP Directory Services
    Saturday, April 23, 2011 2:37 AM
  • Hi,

    I would like to get information about the time when any file was signed.

    Regards,

    Martin.

    Monday, April 25, 2011 5:30 PM
  • Set-AuthenticodeSignature has -TimeStampServer option, but people hardly use it (including myself) so I'm not sure where that info would show up in certificate information (I assume it would be a part of TimeStampCertificate property) and would it help much. I'm not 'signing expert', I only sign my scripts to be sure they were not modified by anybody else ;)

    To get info when script was signed: because Signing a script modifies it, and any attempt to modify it after that will cause an error, I guess it is save to assume that LastWriteTime property of file object will be good enough for checking date when script was signed.

    HTH
    Bartek

    Tuesday, May 10, 2011 5:36 AM