I came across some fun stuff on the internet, so I wrapped it inside a Powershell Function for this blog post.

The idea is to get weather report in Powershell console using this cURL implementation converted into Powershell function below

Just pass a name of the City as a parameter to the Function to get the weather report of the day.

You can pass values through the pipeline as well.

Use ‘-Tomorrow‘ and ‘-DayAfterTomorrow‘ to check the weather of later than today.

To add this script to your Powershell profile run the below piece of code and you are good to go

Hope you’ll find the script fun and Thanks for reading.

Don’t forget to follow me on twitter for more Interesting PowerShell material and to Showoff your Powershell-Weather skills to your colleagues, Cheers! 😉