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: Use Windows PowerShell to display a percentage as a two place number.
(image) How can I use Windows PowerShell to display a number as a percentage that has two decimal places?
(image) Use the -f format specifier, and specify a pattern as “{0:p2}”. On the other side of the -f format specifier, perform your percentage ...
Summary: Use Windows PowerShell to multiply the value stored in a variable and store the results.(image) How can I use Windows PowerShell to multiply the value of a variable and store the results in the same variable?(image) Use the *= operator, for example:PS C:> $a = 2PS C:> $a *= 3PS C:> $a6(image...
Summary: Use Windows PowerShell to select two random numbers from twenty possible numbers.
(image) How can I use Windows PowerShell to select two of twenty attendees at user group to receive prizes?
(image) Create a range of input numbers with the Get-Random cmdlet, then use the –Count parameter to ...
Summary: Use Windows PowerShell to split arrays of numbers into contiguous ranges.
Microsoft Scripting Guy, Ed Wilson, is here. Today I have a cool post from guest blogger, Zachary Loeber. Here is a little bit about Zachary:
(image)
Zachary Loeber is a solution architect with PSC Group. Zachary is a seasoned network and systems architect and ...
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 from the ...