**Summary**: Easily use Windows PowerShell to round numbers.

How can I use Windows PowerShell to easily round numbers?

Use the **Round*** *static method from the **System.Math** class, for example:

PS C:\> 22/7

3.14285714285714

PS C:\> [math]::Round(22/7)

3

PS C:\>

[int][System.Math]::PI

[int][System.Math]::Abs(22/7)

Good one USING TYPE CASTING

or:

$pi = 22/7

$pi

[int] $pi