GCI from Cert store returns floating point variable...

Welcome Forums General PowerShell Q&A GCI from Cert store returns floating point variable...

This topic contains 1 reply, has 2 voices, and was last updated by

9 months, 3 weeks ago.

  • Author
  • #99987

    Points: 1
    Rank: Member

    Hi All,

    I have written a script to retrieve various Certificate objects from multiple servers using the GCI select functionality which is suiting my needs quite well at the moment.
    However I am experiencing a strange side effect on occasion when retrieving the serial number, this only happens on the odd occasion but as an example the serial number say '17 68 85 31 00 00 00 00 00 10' is returning back with a value of '1.78363E+19'
    So, it would seem that Powershell is converting the number to a shorter floating point number?
    As I mentioned earlier the script I have retrieves all of the information I need without a problem, it is only say three of four out of several thousand that come back with this value 🙁

    Any ideas?

    Many thanks!

  • #99988

    Points: 393
    Helping Hand
    Rank: Contributor

    Call .GetType() on both a problematic and non-problematic property, and see what it looks like. They're probably either a different data type, or PS is casting one differently to the other on display for some reason.

The topic ‘GCI from Cert store returns floating point variable...’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort