Showing results for Windows PowerShell - Scripting Blog [archived]

Jun 22, 2016
Post comments count0
Post likes count0

Build a hexadecimal clock in PowerShell – Part 3

Doctor Scripto
Doctor Scripto

Summary: Use Select-String in PowerShell to identify data and match it to an array. Honorary Scripting Guy, Sean Kearney, is here today to play more with our funky, nerdy, cool hexadecimal clock. Yesterday we built out a small function named Get-HexTime to give us the current time that displays hex digits instead of decimal for hours, minutes, an...

Windows PowerShellguest bloggerSean Kearney
Jun 21, 2016
Post comments count1
Post likes count0

PowerTip: Use PowerShell to identify a leap year

Doctor Scripto
Doctor Scripto

Summary: Use PowerShell and Math to identify a leap year. Is there a way to use PowerShell to identify whether this year is a leap year? Actually there is! You can use a combination of Get-date to find out the year and the Modulus function in PowerShell. If the value is zero, the current year is a leap year!

Windows PowerShellPowerTipguest blogger
Jun 21, 2016
Post comments count0
Post likes count0

Build a hexadecimal clock in PowerShell – Part 2

Doctor Scripto
Doctor Scripto

Summary: Manipulate string data from Get-Date in PowerShell. Honorary Scripting Guy, Sean Kearney, is here today to have a little more fun with our silly project to build a hexadecimal clock in the PowerShell console. Well, after all, who said scripting wasn’t allowed to be fun? That’s usually how I learn, by playing about! Yesterday, we defined...

Windows PowerShellguest bloggerSean Kearney
Jun 20, 2016
Post comments count0
Post likes count0

PowerTip: Extend a string array in PowerShell

Doctor Scripto
Doctor Scripto

Summary: Use the built in features of PowerShell to easily add new Element to a string array. I created an array of strings in PowerShell, but I need to add to it. Is there a simple way to do this? Absolutely. Just use += to add an element to your string array. In the following example, we add a new element to the array that’s named $HSG

Windows PowerShellPowerTipguest blogger
Jun 20, 2016
Post comments count0
Post likes count0

Build a hexadecimal clock in PowerShell – Part 1

Doctor Scripto
Doctor Scripto

Honorary Scripting Guy, Sean Kearney, is here today, and I’m going to sit down and have some fun this week. Today I was feeling a bit bored and, for some reason, the thought “hexadecimal clock” entered my head. Don’t ask why because I’m not quite sure about the “Why” part. But, it just did. Then, I sat down and thought, what’s involved? Really? ...

Windows PowerShellguest bloggerSean Kearney