Getting the Windows Azure PowerShell Cmdlets

I’m a big fan of using the Windows Azure PowerShell cmdlets for managing my Windows Azure resources.  They’re incredibly helpful, especially when I need to repeatedly take care of multiple tasks.

There are two ways to get the Windows Azure PowerShell cmdlets – the heavy way and the light way.

Get All the Things!

I would assume most people get the Windows Azure PowerShell cmdlets by taking the path of least resistance.  They go to the Windows Azure downloads page, click the link to “Install” the cmdlet, and let the Web Platform Installer (WebPI) do its thing.  That’s all fine, but it does a lot.  What’s a lot?  Let’s see . . .

Azure PowerShell Web PI

Trying to install the cmdlets via WebPI will also attempt to install a bunch of other software you might not expect, such as:

  • Windows Azure Emulator
  • Microsoft SQL Express LocalDB Edition
  • IIS 8.0 Express
  • Windows Azure Storage Tools
  • Windows Azure Authoring Tools
  • Windows Azure SDK

If you’re an IT Pro / systems admin type of person, that’s probably more than you would expect, or need.

Get Just the One Thing!

If you want just the Windows Azure PowerShell cmdlets, the path of absolute least resistance is to download the latest release from GitHub – https://github.com/WindowsAzure/azure-sdk-tools/releases.  From here you can find links to download via Web PI (we already know what that will bring with it), or get the MSI by itself.

powershell_github

Download and run the MSI and you start off with something pretty familiar and basic.

powershell_msi

Tagged with: ,
Posted in PowerShell, Windows Azure

Windows Azure Cache Options

This week (January 27th – 31st) is Windows Azure week.  As part of Windows Azure week, I was honored to publish a blog for Microsoft Press where I highlighted the various cache options available in Windows Azure.  In this post I discuss both In Role Cache for Cloud Services (web and worker roles) and the new Cache Service for use with Cloud Services, Web Sites, and VMs.  The post goes into detail on how to set up both options, along with some suggestions on which to select for your scenario.  I had a lot of fun writing the post.  I hope you’ll enjoy reading it.

You can read the post on the Microsoft Press blog at http://bit.ly/1hG4bss.

Windows Azure Week

During this week Microsoft is hosting a series of events to help developers and architects understand the features available in Windows Azure, and techniques for how to use them effectively.

  • Monday, January 27th – Getting Started with Windows Azure Today Jump
  • Tuesday, January 28th – Designing Applications for Windows Azure
  • Wednesday, January 29th – Building Modern Web Applications
  • Thursday, January 30th – Windows Azure IT Pro IaaS
  • Friday, January 31st – Mobile Apps to IoT: Connected Devices with Windows Azure

This is sure to be a great series of webinars lead by some of Microsoft’s top cloud experts.  Learn more and register today at http://aka.ms/Rvo1y0.

Tagged with: ,
Posted in Windows Azure

CodeMash 2014

Last Friday wrapped up the 8th CodeMash conference. CodeMash is probably . . . no, it is . . . my favorite conference to attend each year. CodeMash is packed with the most passionate technologists I know. Many attendees are from the MidWest, but an increasing amount are from all over the U.S. and even the world! CodeMash is a great way to re-energize and kick off a new year.

I was fortunate this year to again be a speaker at CodeMash. I gave two presentations – “More Cache with Less Cash” and “Windows Azure Mobile Services – The Perfect Partner”. I would like to thank everyone that attended the sessions. I know I had a good time, and I hope you did as well – and hopefully learned a few things along the way. A few people have asked for my slides. You can find slides for both sessions below.

Tagged with: , ,
Posted in Speaking, Windows Azure

TechEd 2014 Roundtable Recap

Recently I had the good fortune to added a roundtable discussion with some of the fine folks organizing the upcoming Microsoft TechEd conference in Houston.  This was a great opportunity to provide feedback directly to the team that is helping to organize TechEd.  I was also able to meet some fun, passionate folks from all over the United States, and even from the U.K. ImageWe were able to discuss many aspects of TechEd, including pre-conference seminars, keynotes, sessions (breakout and foundational), the alumni lounge, closing attendee party, and much more.  It’s great to see Microsoft putting so much effort into ensuring TechEd attendees are getting a top-notch experience.  Check out this post to learn more about the TechEd Roundtable discussions, including some key benefits of attending TechEd.

If you haven’t yet registered for TechEd, now is the time to do it.  Register before December 31st and save $300!

This was my first trip to Houston (well, for more than anything than changing planes at the airport).  What a cool city!!

WP_20131203_18_36_11_Pro

I was there for a little less than two days, so I didn’t get to see a lot of sites, but what I did see by driving around and eating at a few restaurants was pretty cool.  Two places I ate at while in Houston were The Corner Table and Flying Saucer.  Check out all the plates on the walls and ceiling at Flying Saucer.  Apparently you can earn a plate based on the number of different types of beers you try.  Fun!

WP_20131203_22_58_20_Pro

If you want to see more cool sites and activities in Houston, be sure to watch Joey Snow and Rick Claus on The Countdown Show.

countdown-show

TechEd is going to be held at the George R. Brown Convention Center in Houston.  It is designed to look somewhat like a steam ship. From the smokestacks on the top of the building, to the port holes for windows, to the large support pillars in the exhibition hall . . . this is a really interesting venue!

WP_20131204_09_25_58_Pro WP_20131204_09_22_39_Pro

As I mentioned previously, now is the perfect time to register for TechEd.  Before taking some time away for the holidays, get your registration completed.  You’ll save $300.  Easy.  I’ve been to two previous TechEd’s and have thoroughly enjoyed each.  You meet some great people  – and that’s really one of the key benefits.  TechEd is a fantastic way to share ideas, learn, and make some new friends.  Plus, you get a chance to meet with Microsoft product team members and provide feedback directly to those building the products you use.  In my opinion, that is very valuable.

Hope to see you in Houston!

Tagged with:
Posted in TechEd

Azure Management Studio and Blob Container ACLs

Here’s a quick tip I recently learned from my friend, and Cerebrata evangelist, Mike Wood . . .

When using Cerebrata’s Azure Management Studio to work with Windows Azure blob storage, you need to explicitly tell AMS to retrieve the access permissions for blob containers.  By default, AMS will only list the containers.

no_acls

To make this tool even more useful, instruct AMS to retrieve the permissions when listing the containers.

  1. Under the “Tools” menu at the top, select “Options”.
  2. In the “Options” window, go to the “Blob” tab.
  3. In the “Blob behaviour” section, check the box next to “Fetch Blob Container ACL when listing Blob Containers”.

set_option

This will instruct AMS to get the permissions and thus color highlight the containers.  Ooooh . . . pretty colors!

with_acls

How is AMS getting this info to know what the permission is for the containers?  Simple – it’s just calling into the Windows Azure storage API.  The Get Container ACL operation retrieves the blob container permissions.  If we open Fiddler and take a look at the requests AMS is making, we can see 4 requests for my example – one to retrieve the list of containers and one for each of the containers.

Note: I instructed AMS to not use HTTPS for connections.  I did this only to make visualizing the requests/responses in Fiddler easier.  I would recommend HTTPS for most production scenarios.

all_reqeusts

Let’s look at just the request to get the ACL for the “myimages” container.

request-response

Notice the “x-ms-blob-public-access” response header.  It is set to “Container”.  This indicates full public read access for the container and blob data.  Therefore, AMS colors this container a lovely shade of green.

A word to the wise – there is a reason why this option is not enabled in Azure Management Studio by default.  If the storage account contains many containers, this could result in many extra requests to Windows Azure to determine the ACL – one roundtrip per container.  This could slow down your time to view all the containers.  If you just have a few containers, it’s probably not a big deal as this request/response dance happens pretty fast.

So that didn’t exactly turn out to be a quick tip.  But, still hopefully useful.  Enjoy!

Tagged with: ,
Posted in Windows Azure

Windows Azure AD authentication support for PowerShell

Last week Microsoft announced several fantastic updates to Windows Azure.

One of the updates I’m really excited about is the new Windows Azure Active Directory authentication support in PowerShell.  Previously to allow the Windows Azure PowerShell cmdlets to authenticate with Windows Azure, you’re only choice was via a management certificate.  There were two options to get that certificate:

  1. Download a .publishsettings file and import the file (Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile)
  2. Create a cert yourself and configure it in PowerShell (see my previous post)

While not a bad way to go, they came with the overhead of deal with management certs.

Configuring Windows Azure Active Directory authentication in PowerShell

1) Get-AzureAccount – To start with, let’s run the Get-AzureAccount cmdlet to see what accounts are already configured.  Since this is my first time, there shouldn’t be any listed.

get_azureaccount

2) Add-AzureAccount – this will open a browser dialog prompting me to authenticate with the Microsoft Account (formerly Live ID) that I want to use for managing my Windows Azure subscriptions.  For me, this one Microsoft Account is a co-admin on multiple subscriptions, and just happens to be a user in multiple Windows Azure AD tenants.

add_azureaccount_login_1

add_azureaccount_login_2

3)  That’s pretty much it.  If I try to list all my subscriptions, I’ll can easily do that with Get-AzureSubscription.  Notice how there is a “ActiveDirectoryUserId” field.

add_azureaccount

get_azuresubscription

What did this actually do?

If I browse to my user profile directory (C:\Users\<username>\AppData\Roaming\Windows Azure Powershell), I can view the WindowsAzureProfile.xml file.  This is the file that was updated as a result of the Add-AzureAccount cmdlet.  It is basically what gets dumped when executing the Get-AzureSubscription cmdlet.

As noted here, the Windows Azure AD credentials available to PowerShell are good only for 12 hours.

See the most recent Windows Azure PowerShell change log at https://raw.github.com/WindowsAzure/azure-sdk-tools/master/ChangeLog.txt.

Tagged with: ,
Posted in PowerShell, Windows Azure

Setting a Web/Worker Role Name

I was recently reminded by my friend Nuno that you can actually set the name of the machine used in a Windows Azure Cloud Service (Web or Worker Role).  Normally I really don’t care about the name of the machine.  I’m fine with RD-whatever.

not_set_role_vm_name

If I did care, there is a way to set that machine name.  There is a “vmName” attribute in the Role element of the role’s .cscfg file.

<?xml version="1.0" encoding="utf-8"?>
<ServiceConfiguration serviceName="CloudServiceName" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2013-10.2.2">
  <Role name="WebRole1" vmName="CollierWeb">
    <Instances count="1" />
    <ConfigurationSettings/>
  </Role>
</ServiceConfiguration>

Doing so will result in the machine name being set to whatever is in the “vmName” attribute, appended with the instance number (0, 1, 2, etc.)

set_role_vm_name
Keep in mind that the “vmName” attribute value must be less than 10 characters.

Note that the role name will still be whatever is set in the .cscfg, appended with the instance number.

role_name

For more on the schema of the .cscfg file, please see MSDN.

Tagged with: ,
Posted in Windows Azure
Follow Michael S. Collier's Blog on WordPress.com
Follow

Get every new post delivered to your Inbox.

Join 1,709 other followers