PowerShell DSC: Creating IIS things on an Azure VM

I started out with an Azure VM (WS 2012 R2, SQLServer 2016). My aim was to deploy a web application so that the index.html was visible to the external world.

Additions I did not yet manage to achieve in DSC were a) adding endpoints for http and https in ARM, b) setting up self-signed certificates on the host VM. The http part right now is a Must.. the https might be considered optional but sensible.

Right now, this is the exciting output as an external user:

That already highlights one new thing: The UK now has its own Azure data centres… previously I noticed I would often get my browser language in Dutch.

Before I show you the whole of the DSC config, some key points were:

  • the use of the CimSession parameter to Start-DscConfiguration
  • as in a previous post, the need to delete pending configurations… assuming you are sure you don’t want them
  • There seems to be no “Let it be so” option for an existing virtual directory… so might have to replace that with some imperative code.

 

Code here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s