/ShutdownAzureResources

Automatically shutdown (or scale down) Azure resources on a schedule every day.

Primary LanguagePowerShellMIT LicenseMIT

New Depoyments
Deploy to Azure

Upgrading an existing Runbook
Deploy to Azure

ShutdownAzureResources

Automatically shutdown (or scale down) Azure resources on a schedule every day.

This solutions requires at least one Credential be created within the runbook configruation. This Credential can be created with any name and needs to have the a username and password for an account which has access to manage the Azure Subscription.

A second credential can be created with any name with your credentials for SendGrid.

For the $SubscriptionFilter parameter specify a string filter to filter down the list of subscriptions to process such as "dev*".

You can then schedule this runbook to run as often as you'd like.

The deployment now automatically upgrades all the PowerShell modules from a static source stored in an Azure Storage Account. If for some reason the modeles throw errors when being upgraded (it happens for no good reason we can find, and it happens randomly) upgrade the failed modules manually as shown in this blog post. When you deploy there is a parameter which is set with the URI to get the PowerShell modules from. You can change this to your own URI if desired.

After upgrading the Azure PowerShell modules (if needed) you'll need to schedule how often you want the modeule to run using the Runbook Scheduler. It is recommended to configure it to run nightly.

If you have deployed this in the past and just wish to upgrade to the latest version use the Upgrade button at the top of this page so avoid having to fill out the various credentials when deploying. Do make sure to select the current Resource Group and the current Region to deploy to.

If you have installed a prior version an update was just putout. You'll either want to use our upgrade button above, or tell Azure Automation to upgrade your modules to the current version (this feature is pretty new as well).