When running on culture other than US English, the non-exported function Get-APIVersion might return version in wrong format, which causes other functions to fail.
This happens because Measure-Object -Maximum causes input to be parsed as a number and ToString() formats number according to user's current culture if no other formatting information is provided.
When running on culture other than US English, the non-exported function
Get-APIVersion
might return version in wrong format, which causes other functions to fail.https://github.com/jondwaite/CIVMDisks/blob/master/CIVMDisks.psm1#L37
Example from a system using
fi-FI
culture. Note how decimal separator is replaced with comma.This happens because
Measure-Object -Maximum
causes input to be parsed as a number andToString()
formats number according to user's current culture if no other formatting information is provided.