Showing tag results for Numbers

Jan 30, 2015
Post comments count0
Post likes count0

Rounding Numbers—PowerShell Style

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to round numbers.  Hey, Scripting Guy! I think your series about formatting numbers has been pretty interesting. However, everything you have shown has a major problem—and that is that you convert numbers into strings. I would love to be able to displa...

Scripting Guy!Windows PowerShellgetting started
Jan 29, 2015
Post comments count0
Post likes count1

PowerTip: Express Percentage in PowerShell

Doctor Scripto
Doctor Scripto

Summary: Learn an easy method to express a percentage in Windows PowerShell.  How can I use Windows PowerShell to express a two-decimal place percentage? For example, I have multiple            calculations in a Windows PowerShell script, and I am tired of always dividing two numbers, multiplying     &nb...

Scripting Guy!Windows PowerShellPowerTip
Jan 29, 2015
Post comments count0
Post likes count0

Using PowerShell and Standard Number Formats

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using standard number formats.  Hey, Scripting Guy! I love using Windows PowerShell. I use it for everything. My problem is that it does not do everything automatically. For example, I use the Get-Volume cmdlet a lot to check on disk space, but I need to do a manual calculation to see th...

Scripting Guy!Windows PowerShellgetting started
Jan 28, 2015
Post comments count0
Post likes count0

PowerTip: Round a Number with PowerShell

Doctor Scripto
Doctor Scripto

Summary: Use Windows PowerShell to round numbers to a specific decimal place.  How can I use Windows PowerShell to round a number to a specific number of decimal places, and continue to            have a number instead of converting it to a string.  Use the Round static method from the System.Math c...

Scripting Guy!Windows PowerShellPowerTip
Jan 28, 2015
Post comments count0
Post likes count0

PowerTip: Format Decimal Numbers in PowerShell

Doctor Scripto
Doctor Scripto

Summary: Learn how to display a specific number of decimal points in Windows PowerShell.  How can I use Windows PowerShell to display only one decimal place on a number that currently has two?  Use a custom number format string with the ToString method from the number, for example: PS C:\> (1.11).tostring("#.#") 1.1...

Scripting Guy!Windows PowerShellPowerTip