Azure: Billing

As I managed to blow my monthly Azure credits last time by not shutting down instances, I shall make sure that doesn’t happen again.

But I shall take checkpoints before doing that…

(sigh…) oh no you don’t. Take a look: evidently the capture is destructive, and you need to run SysPrep first. Not doing that tonight.

So given all my VMs, I need a a PowerShell script to shut them all down. Presumably from a cold start, I need to a) get my subscription, b) enumerate the VMs, c) stop if started, and is there a wait-for-job type command. And lastly do a check on the portal that they are indeed shutdown.

But I have successfully added an http endpoint which works fine, once I’ve installed IIS, and the DNS is obviously working fine, as I can address it by name from a remote machine. Great.