Showing results for January 2015 - Page 2 of 11 - Scripting Blog [archived]

Jan 29, 2015
0
0

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
0
0

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
0
0

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
Jan 28, 2015
2
0

Formatting PowerShell Decimal Places

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using strings to format the display of decimal places in Windows PowerShell.  Hey, Scripting Guy! One of the things I have a problem with is when I get numbers that have a lot of decimal places. I mean, how do I really get rid of them—at least properly? I have done things like conv...

Scripting Guy!Windows PowerShellgetting started
Jan 27, 2015
0
0

PowerTip: Use Parentheses to Override Operator Precedence

Doctor Scripto
Doctor Scripto

Summary: Use parentheses to override operator precedence in Windows PowerShell.  How can I ensure that a math expression that keeps returning incorrect information will work properly in            Windows PowerShell?                &nb...

Scripting Guy!Windows PowerShellPowerTip