ridicurious.com
Powershell, PSTip

Powershell Weather Report and Forecasting

I came across some fun stuff on the internet, so I wrote a quick wrapper to make a Powershell weather forecasting Function for this blog post.

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

PowerShell Weather Forecasting Function:

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

PowerShell Weather

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

If you like this article, you may want to take a look at my Web and Native API Blog series for similar and other interesting implementations in PowerShell.

Don’t forget to show off your Powershell-Weather skills to your colleagues, Cheers! 😉

Subscribe to our mailing list

* indicates required


Related posts

Install AWS Tools for PowerShell Core 6.0.2

Prateek Singh
6 years ago

PowerShell : GUI based Email Search and Removal in Exchange

Prateek Singh
8 years ago

Adding leading zero with PowerShell Format Operator

Prateek Singh
7 years ago
Exit mobile version