Showing results for September 2013 - Page 4 of 13 - Scripting Blog [archived]

Sep 23, 2013
Post comments count0
Post likes count0

Adding Array Index Numbers to PowerShell Custom Objects

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about adding array index numbers to Windows PowerShell custom objects.  Hey, Scripting Guy! Our software application returns arrays of information. What I need is a way to artificially add the array element number to the object that the cmdlet outputs. For example, I want to add the highlighte...

Scripting Guy!Windows PowerShellscripting techniques
Sep 22, 2013
Post comments count0
Post likes count0

PowerTip: Determine Size of PowerShell Console

Doctor Scripto
Doctor Scripto

Summary: Determine how large your Windows PowerShell console is.  How can I see how large my Windows PowerShell console is?  Access the WindowSize property from the $Host object: $Host.UI.RawUI.WindowSize.Width $Host.UI.RawUI.WindowSize.Height

Windows PowerShellPowerTipguest blogger
Sep 22, 2013
Post comments count0
Post likes count0

Weekend Scripter: Using PowerShell to Cook Popcorn for Music

Doctor Scripto
Doctor Scripto

Summary: Leverage Windows PowerShell for some simple on-screen animation. Honorary Scripting Guy, Sean Kearney, here. I’m filling in for our good friend, Ed Wilson. Ed got hungry today and asked me to make him some popcorn. So today we’ll use Windows PowerShell to make some—just some little bits for fun. In actual reality I’...

Windows PowerShellguest bloggerWeekend Scripter
Sep 21, 2013
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Send Beep to Console

Doctor Scripto
Doctor Scripto

Summary: Use the Beep command in Windows PowerShell.  How can I send a sound in Windows PowerShell to notify a user if an error occurs in the script?  Windows PowerShell can send a Beep to the console: [console]::beep(500,300) Change the value of the first number to alter the pitch (anything lower than 190 or higher than 8500 ca...

Windows PowerShellPowerTipguest blogger
Sep 21, 2013
Post comments count0
Post likes count0

Weekend Scripter: Use Windows PowerShell to Play Recorded Music

Doctor Scripto
Doctor Scripto

Summary: Use a hash table and an array to run prearranged actions. Honorary Scripting Guy, Sean Kearney here. I’m filling in for our good friend, Ed again today. I think he’s busy playing some tunes with the Windows PowerShell piano we created last week. So continuing from last weekend’s silliness, I had the song “Popcorn&rd...

Windows PowerShellguest bloggerWeekend Scripter