By now you’ve installed PowerShell, tried out a few cmdlets and are trying to figure out how you will use all this great information. Well, there’s more for you to take a look at. Even though PowerShell is a console, you sure to still want some GUI elements such as charts and gauges. Fortunately, that’s pretty easy to accomplish.
Category: General
Windows PowerShell: TFM – Proof approved!
Start cutting down trees and mixing inks… as of this morning, Windows PowerShell: TFM is officially “on the presses.” If you haven’t pre-ordered a copy from Amazon.com or ScriptingOutpost.com, now’s the time! Although we can’t guarantee holiday delivery <grin>…
Whoever said Microsoft was all about business?
All work and no play, as they say, makes Jack a dull boy. Well, the folks at Microsoft don’t know Jack (heh), apparantly. Check out http://www.microsoft.com/robotics, and rejoice in your ability to help program the next generation of our one-day robotic overlords.Technorati Tags:robots
Start Simple
Here’s another quick suggestion, especially for VBScript, that will make script development and debugging a little easier and a lot less stressful. It may seem like common sense, but sometimes we all just need a reminder: Start Simple.
More Pinging…
Okay, I teased yesterday… so check out this function:
Function Ping-Name {
PROCESS {
$wmi = get-wmiobject -query “SELECT * FROM Win32_PingStatus WHERE Address = ‘$_'”
if ($wmi.StatusCode -eq 0) {
$_
}
}
}Notice that the function name looks like a cmdlet name? This function can sorta be used l ike a cmdlet. For example:
Get-Content …
More CLI and PowerShell
You don’t have to choose between the traditional command line interface (CLI) and PowerShell. You can easily run a PowerShell command or even a PowerShell script directly from a command prompt. This means you can integrate some PowerShell functionality into your older batch files. It also means that you can create a scheduled task to execute a PowerShell script!
Extending Types – Okay, already
Having been asked plenty of times, here’s the type extension I added to create the CanPing property for the String type.
Weather Report
If you’ve been following along in our blogs, you’ve hopefully read my posts about using the SAPI.SPVoice COM object. I’ve been trying to come up with some practical applications. I’ve developed one that gets a weather report for your zip code and delivers the weather to you. The script uses a .NET weblclient object to retrieve an XML page from Yahoo! weather.
Convert VBScript to PowerShell!
Here’s an AWESOME resource: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/convert/default.mspx, the Scripting Guys’ complete guide to VBScript functions… or, more specifically, how to do each VBScript function in Windows PowerShell! It’s available online, or you can download the whole thing as a Word document. For each VBScript function or statement, you’ll see a Windows PowerShell version along with a brief explanation. Not that there’s …
Tip: CLI to PowerShell
If you have PowerShell installed (and if you don’t what are you waiting for?) you may be used to starting PowerShell from the Start Menu shortcut. But that’s not the only way.