[PowerShell] Cannot Invoke [math] floor

If windows domain restrictions on your laptop prevent you from using the [math] floor function to round down your floating point numbers -

[math]::floor(12.3)
Cannot invoke method. Method invocation is supported only on core types in this language mode...

- there is another method you can use:

([String]([Float](12.3))).Split(".")[0]

12

Image: Using dot split to round down your floating point number when [math] floor does not work.

Comments