The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using standard number formats.
(image) 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 ...
Summary: Use Windows PowerShell to round numbers to a specific decimal place.
(image) 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.
(image) Use the Round static method ...
Summary: Learn how to display a specific number of decimal points in Windows PowerShell.
(image) How can I use Windows PowerShell to display only one decimal place on a number that currently has two?
(image) Use a custom number format string with the ToString method from the number, for example:
PS C:\> (1.11).tostring...
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using strings to format the display of decimal places in Windows PowerShell.
(image) 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 ...
Summary: Use parentheses to override operator precedence in Windows PowerShell.
(image) How can I ensure that a math expression that keeps returning incorrect information will work properly in Windows PowerShell? &...