Welcome to MSDN Blogs Sign in | Join | Help

Get-Weather

Jeffery Hicks has a very cool blog entry where he defines a Get-Weather script which downloads the weather from yahoo.com, casts the results to XML and then reports the weather using the Speech object.  It's totally cool.  I'm going to show it off today during my demo. 

I'm down in LA meeting with MySpace and getting a tour of the operations and seeing how they use PowerShell to manage their production servers.  I get to do a demo at their Friday "Dojo" meeting (Pizza and presentation).  As a kid, I used to go to "old-school" Uechi-Ryu Dojo where they used to hit us while doing katas (sometimes with baseball bats!) to ensure that we were focusing our minds.  - I'm hoping this Dojo is a little gentler than that. :-)

 I'm going to tweak Jeffery's script to make it my own.  I'm going the default ZIP code and temp scale and then use a HERE string and make one call to Speak().  There is no good reason for this other than style and the fact that I just absolutely love here strings. 

Enjoy!

Jeffrey Snover [MSFT]
Windows PowerShell/MMC Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Published Friday, December 08, 2006 4:00 PM by PowerShellTeam

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: PROXY

For those users behind a proxy, you'll need to add a few lines after the $webclient initialization line:

   $proxy = New-Object System.Net.WebProxy "MyProxyServer:MyProxyPort"

   $proxy.UseDefaultCredentials = $true

   $webclient.proxy = $proxy

You'll need to replace MyProxyServer and MyProxyPort with the appropriate values for your proxy server (found easily in IE under Options\Connections\Lan Settings)

Thanks for another great find Jeff!

Friday, December 08, 2006 4:29 PM by Eric

# re: Get-Weather

That was an awsome presentation on Friday!  Especially showing us the get-weather cmdlt.

Thanks Jeff!!!!!

Saturday, December 09, 2006 3:42 PM by Jarrett Irons

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker