Freelancing will improve your skills

One of the things I love the most about working in development is the chance to continuously learn new skills. It keeps the work fresh and challenging, which are both things that are important to me.

Life as a software developer means continuously learning new technologies and ideas. It is simply part of the job but when I started freelancing that learning curve accelerated dramatically and my skills and knowledge increased similarly. I like to think  I have become a much more able and confident developer since I started to freelance.

Continue reading

List all your resources in Azure

I want to share a handy script that lists out all the resources in your Azure subscriptions and exports that data to an excel workbook.

It really lists out every single Azure resource (classic and ARM) from virtual machines and NICS to automation accounts and alerts. There are also a few tricks in there to decorate the data with some extra information. e.g. whether a vm is powered on, what vnet it is in etc. You can use a similar approach to modify the script to output whatever data you are interested in.

The script is very useful at giving a quick overview of what your current azure usage is and is good for flagging up anything that shouldn’t be there.

Continue reading

Auditing Management Certificates in Azure

The cmdlets Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile setup and configure management certificates in Azure and on the local machine to allow easy authentication to access classic resources in Azure.

man certs

I have seen several potential pitfalls with this approach.

  • Removing a user as co-admin on a subscription does not remove or invalidate the management certificates. Unless you have really on the ball Azure admins, this can leave users with full access to your classic resources even after they have been removed as subscription admins.
  • Management certificates can not be linked to specific users. This makes removing a specific users management certificates very tricky.
  • The anonymity of these certificates makes auditing user actions very difficult.

It is for all these reasons that I see the use of these certificates as a very big security risk and it is worth noting that the use of management certificates and publish settings has been deprecated for ARM resources.

In all the Azure environments I have worked in I have enacted a policy to disallow the use of management certificates completely and force all users and applications to authenticate into Azure using different methods (Azure active directory, service principals). The following scripts show how we can automate the auditing of these certificates and potentially automate the removal of unauthorised certificates.

Continue reading

Getting Serious about Powershell

Powershell is what I would describe as a ‘stackoverflow language’. Its the kind of language that, as long as you’ve got some previous experience developing on Windows, you can just get started with by reading a few stackoverflow posts and copying and pasting a few code snippets here and there.

Very few developers out there take their Powershell skills and knowledge seriously and simply use it as a means to an end. This often results in messy, sprawling, untestable and unextensible collections of scripts which end up impeding rather than enabling development.

I have seen this in many teams I’ve worked in and I’ve been that Powershell stackoverflow developer. I experienced first hand the impeding nature this had on the development and release cycle but thankfully a while ago I started taking Powershell development much more seriously and started using lots of new and emerging technologies and frameworks to treat Powershell as a first class language. Here are my top tips of things you should be doing to if you want to start taking Powershell development seriously

Continue reading

TFS Build 2015 (vNext) – Gated Builds

This post is part of a series of articles on the new TFS Build vNext System.

Using the old xaml builds we had the ability to perform gated checkins. This is only available for TFVC projects and not for GIT projects, mainly because this concept of gated builds uses shelvesets which are not applicable when using GIT.

With the new vNext build definitions, the concept of gated builds is gone from the triggers tab for both GIT and TFVC based builds.So what about gated checkins for vNext builds?

In TFS 2015 and Visual Studio Online we now have the ability to gate commits made to GIT and much more using a feature called branch polices. This functionality is only available for GIT projects currently, it will be interesting to see if and how Microsoft supports this for TFVC. I want to take a closer look at these new features.

Continue reading

TFS Build 2015 (vNext) – Custom Tasks

This post is part of a series of articles on the new TFS Build vNext System.

So I’ve talked before about how the new cross platform build system in TFS 2015 and Visual Studio Online is fully extensible and allows you to create your own custom build tasks but it isn’t immediately obvious how to do it.

I’ll would like to walk through an end to end example creating a custom vnext build task to run a SQL script as part of the build

The tasks for build vNext are open source and Microsoft is accepting contributions so if you write a really nice and useful task it could be included in every Visual Studio Online account.

Continue reading

Visual Studio Online is now truly cross platform

Microsoft is doing a great job of embracing open source, cross platform technologies. Just look at the release of Visual Studio 2015, we’ve got first class support for python, node, android, iOS, cordova, the list is endless. The days of using Microsoft developer tools to develop code that only runs on Windows servers is over.

More than that, updates to Visual Studio Online made over the last few years, starting with support for GIT and now the new cross platform build system, have finally made the Visual Studio Online platform a real choice for non Microsoft developers.

Don’t believe me, well let me walk through an example how you can use Microsoft tools to create the full development infrastructure, from source control to build, test, deployment and hosting, to support a node.js project (or any other non Microsoft language actually) without ever coming across, using or interacting with a Windows Server or Windows operating system.

Continue reading