GCI from Cert store returns floating point variable...
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 🙁
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.
You must be logged in to reply to this topic.