AlternativeIdentifierRefs problems with ACME New Certificate

The AlternativeIdentifierRefs parameter is used by the New-ACMECertificate cmdlet in ACMESharp when you want Let’s encrypt to have an secondary domain in the same certificate as your primary alias.
This is handy because Let’s Encrypt doesn’t support wildcards. EDIT: Let’s Encrypt ACMEv2 endpoint DOES support wildcards, but the Powershell module as it stands does not use ACMEv2.

I was having an issue when trying to do this;

New-ACMECertificate : The given key was not present in the dictionary

This was because in the previous steps in my script, I was only validating my ownership of the first alias – not of the alternative domains. I need to validate all domains before a certificate will be issued.

Here’s some code snippets of what I ended up with;

Cloud Solution Architect at Microsoft in the UK.

Azure Powershell on linux on windows

In the Windows 10 Anniversary update you’re able to install the “Windows Subsystem for Linux”, see the Bash on Ubuntu on Windows blog.

Then in August we announced that Powershell had been opensourced and available on linux :

The version of Ubuntu that gets installed is 14.04 – which is supported by Powershell. So obviously the first thing you’ll want to do on your Windows 10 OS, is install Bash then Powershell and then the Azure module for Powershell. If only for a change of scenery and a bit of script-inception.

Installing Azure Powershell on Linux, in Windows

Cloud Solution Architect at Microsoft in the UK.

Using the Azure Billing API with Powershell

Once you’ve got an Enterprise Agreement with Microsoft Azure, you’ll probably want to know how much you’re spending.

As with everything Azure, you’re better off forgetting the UI and using Powershell.

Unfortunately, the billing API doesn’t return detailed information in a Json or xml format – it is a long string delimited by commas and linebreaks.

Before we can do anything with the detailed data we get from the API we need to clean it up into a powershell object.  Once we have a usable object to work with then we can start playing with the billing data.

In the example below, I’ve used the sample data account (Enrollment #100), just plug in your own enrollment number and the access key from the Azure Enterprise Site and you’ll be away.
For full documentation on the EA API, you can find the API guide here

Cloud Solution Architect at Microsoft in the UK.

Convert a Powershell hashtable to object

I’ve struggled on a few occasions of being lumbered with a hashtable that i’d created for whatever reason (usually because it’s so damn quick and easy).
Having my roots in OO development, I inevitably want to start dealing with objects at some point.

Long story short, here you go 🙂

Cloud Solution Architect at Microsoft in the UK.

Using the Statuscake API with Powershell

Having set up a few URL monitors with Statuscake, I needed to get the data out to start playing with it in Microsoft Excel/PowerQuery.
There are 3 sets of data that i’m extracting with the script below.

    Location data
    Test definition data
    Test Performance data

On top of the basic API calls to Statuscake I wanted to enrich their Location data with actual Geo data that could be used in a BI visualisation. For this i’m using FreeGeoIP.

Cloud Solution Architect at Microsoft in the UK.