Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Formatting PowerShell Decimal Places

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

Working with Fixed Number Sizes in PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, talks about working with fixed number sizes in Windows PowerShell. (image)  Hey, Scripting Guy! I have a script that returns a specific type of number, so I added a type constraint on the variable that holds the number. The problem is that sometimes when I run the script, I get errors. I cannot...

Understanding Numbers in PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, talks about numbers in Windows PowerShell. (image)  Hey, Scripting Guy! One of the things that is frustrating to me with Windows PowerShell is the way that it handles numbers. For example, I want to know the percent of processor utilization for something, and it displays a number that is like ...