Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tools for interacting with Windows Azure from the command line
C# Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.nuget
Aws.AzureTools
CopyBlob Updated references
CreateTable
DeleteBlob
DeleteContainer Lots of new features from Michal Kruml
DeleteTable
GetBlob
ListBlobs
ListContainers
ListQueues Updated references
ListTables Updated references
PutBlob
PutLargeBlob
QueryTable
TouchBlob
Trace
TraceConsole Updated references
TraceListener Updated references
TraceProcess
dist Added modified TraceConsole
.gitignore Updated references
AzureCommandLineTools.sln
LICENSE.txt
README.md

README.md

AzureCommandLineTools

Simple command line tools for interacting with Windows Azure from a command prompt or batch file in Windows.

The tools compile to a subdirectory called "dist" - edit and run the setup.bat file in there to get started.

Setup.bat

Before running these commands you need to set an environment variable with your azure storage configuration details. Most people will need something like this:

SET AZURE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=YOURACCOUNTNAME;AccountKey=YOURACCOUNTKEY

or for more advanced usage, see http://blogs.msdn.com/b/partlycloudy/archive/2009/12/08/configuring-the-storage-client-with-connection-strings.aspx, for example:

SET AZURE_CONNECTION_STRING=TableEndpoint=https://YOURACCOUNTNAME.TABLE.COM/;QueueEndpoint=https://YOURACCOUNTNAME.QUEUE.COM/;BlobEndpoint=https://YOURACCOUNTNAME.BLOB.COM/;AccountName=YOURACCOUNTNAME;AccountKey=YOURACCOUNTKEY

You can optionally set environment variables for TIMEOUT (in seconds) and RETRY_COUNT - particulalrly useful if you are on a slow connection.

I've also included a slightly modified version of TraceConsole, the program from the AppFabric samples that allows you to see debug output locally. This is used in AzureRunMe.

In order to use it, you can set environment vairables like this:

SET CLOUD_TRACE_SERVICE_PATH=YOURSERVICEPATH
SET CLOUD_TRACE_SERVICE_NAMESPACE=YOURNAMESPACE
SET CLOUD_TRACE_ISSUER_NAME=YOURISSUERNAME
SET CLOUD_TRACE_ISSUER_SECRET=YOURISSUERSECRET

These settings are used by trace.exe and traceconsole.exe.

It's convenient to put these in a batch file like setup.bat - I create a copy of setup.bat for each of my projects.

Examples

ListContainers

ListBlobs

ListBlobs mycontainer

PutBlob myfilename mycontainer

PutBlob myfilename mycontainer/myblob

GetBlob mycontainer/myblob

DeleteBlob mycontainer/myblob

CopyBlob mycontainer/myblob1 mycontainer/myblob2

ListQueues

ListTables

CreateTable table

DeleteTable table

TouchBlob mycontainer/myblob

TraceConsole

Trace "Hello World"

Rob Blackwell

May 2011

Something went wrong with that request. Please try again.