HOW TO add an entity to a Microsoft Azure Table with PowerShell

As a PowerShell newbie, I'm amazed that you can insert entities into Azure Table Storage with a simple script right from your desktop. I found it impressive that you can even write PowerShell code within Notepad or any basic text editor - a low barrier of entry that reminded me of developing with PHP and Classic ASP. To run the script at the PS command prompt, you have to change to directory where you saved the script and run the command ./your_script.PS1. Using the light-weight PowerShell Integrated Scripting Environment (ISE) simplifies coding & executing the script.

While using the code snippet mentioned above, you have to ensure that you're using PowerShell version 3 or above and ensure that the file path of the Microsoft.WindowsAzure.Storage & System.Data.Services.Client DLLs referenced is appropriate. Specify the Azure Storage account name and key and you're good to go.

This PowerShell script saves minimum, maximum temperature fetched from Yahoo Weather API using YQL & stores it in Windows Azure Table

Comments