Microsoft Azure enables you to script and automate virtually everything using Windows PowerShell or the cross platform command line tools, which can be used from Windows, Mac, or Linux.
Creates four Windows Server 2012 Virtual Machines across two separate cloud services and adds them to the same virtual network. If the virtual network indicated does not exist then it is created.
Creates two virtual machines; a front-end Windows Server and a back-end SQL server. The front-end server is configured with the Web Platform Installer, which is then used to install an application published on the Web Platform Installer catalog.
Demonstrates the use of PowerShell workflow checkpoints in a runbook.
Downloads IIS logs from an Azure Website and searches the log for any HTTP 400 and above status codes. If Http logging is not enabled on the website, then it will enable logging if the EnableHttpLogging switch is specified.
Creates a HDInsight cluster configured with one storage account and default metastores. If storage account or container are not specified they are created automatically under the same name as the one provided for cluster.
This runbook sets up a connection to an Azure virtual machine.
This script allows a user to create a *Data Warehousing* optimized VM on Azure running SQL Server 2012 or SQL Server 2014, script will also attach empty disks to the VM to be used for Sql server data and log files.
Script will walk you through changing size and type of a database along with setting and removing firewall rules
This runbook syncs all runbooks from a Visual Studio online (VSO) git repository to an Azure Automation Account.
Demonstrates how the settings of a web site can be set remotely using PowerShell. Assumes a Facebook application that has been deployed, and changes its settings for AppId and AppSecret.
This set of runbooks demonstrates how you could monitor websites in your Azure subscription and alert the on call engineer of issues via text message, as demonstrated in the Azure Automation announcement. It is intended for demonstration purposes only.
This runbook sets up a connection to an Azure subscription by placing the Azure management certificate into the local machine store and setting the connection to the subscription. Warning: this runbook is deprecated.
This script creates an SQL Server AlwaysOn availability group on Windows Azure VMs end-to-end, beginning with the creation of the Windows Azure VMs and ends with a working availability group listener.
This runbook creates a simple new Stand-Alone Azure Endpoint for a specified Virtual Machine.
Create an Remote Desktop Connection Manager (.rdg) file in an Azure Automation Workflow - containing all the RDP endpoints of your VMs.
The scripts allow a MSDN subscriber to quickly create a dev-test VM on Azure running Visual Studio 2013 Pro|Premium|Ultimate, SQL Server 2012 Developer edition SP1 and SharePoint 2013 trial.
This runbook starts a child runbook synchronously.
Use this Azure Automation Runbook to create a Linux guest in an existing Cloud Service. You need to use the "Connect to an Azure Subscription" Runbook too for this solution to work.
Creates a Virtual Machine (small) configured with two data disks. After the Virtual Machine is provisioned and running, the data disks are then formatted and drive letters assigned. User is prompted for credentials to use to provision the new Virtual Machine.
Starts an asynchronous copy of VHD's to a different storage account. The storage account can be in the current subscription or in a different subscription.
Enumeration of instances/databases
Creates a new Virtual Machine image based on a given stock image. Installs an application from the Web Platform Installer. The images is saved to the user's subscription to be used for provisioning future Virtual Machines.
This is an updated version of the Windows PowerShell deployment scripts generated in Visual Studio. This script demonstrates how to use Azure PowerShell Cmdlets to create Azure resources and deploy Azure application using the newly introduced Azure Resource Manager template.
Deploy a specified number of Virtual Machines based on a given image name. The Virtual Machines are placed in the same availability set and load balanced on a given endpoint name.
This runbook outputs the number of records specified in a SQL Server database table.
Copies blobs from a single storage container or all storage containers to a local directory. If the blobs have "/" in the name to represent a directory hierarchy, then the script will recreate that directory hierarchy under the local destination path specified.
This topic provides sample scripts that can be used to automate backups to Windows Azure Blob storage service using PowerShell cmdlets.
This runbook downloads an Azure blob to the host running the runbook job.
This Azure Automation runbook provides an example of how Azure Automation can be used to execute SQL Agent jobs in the cloud. This example demonstrates how to truncate a table if one or more database approach their maximum size.
This Azure Automation runbook copies a file from the local runbook host to an Azure virtual machine. This runbook is intended to run after a file is copied to the local host so ensure that you have copied the file to the runbook host before calling this.
This runbook illustrates how to use input parameters in runbooks.
This runbook creates a number of Azure Environment Resources (in sequence): Azure Affinity Group, Azure Cloud Service, Azure Storage Account, Azure Storage Container, Azure VM Image, and Azure VM. It also requires the Upload of a VHD to a specified storage container mid-process.
Creates a Windows Server 2012 R2 Active Directory forest in Azure.
This Azure Automation runbook copies a remote file from a Windows Azure virtual machine to the runbook host running the job. It calls the Connect-AzureVM runbook to connect to the VM, so this runbook must also be imported and published.
This set of runbooks demonstrates how you could install / manage Windows Updates on an Azure VM, as demonstrated in the Azure Automation announcement. It is intended for demonstration purposes only and is not meant for production use.
Removes blobs from blob storage containers. The script will enumerate through all containers and remove the blobs, maintaining the existence of the container. If you want to remove the containers, then you can include the RemoveContainer switch.
This sample script demonstrates how to deploy a .NET corporate site into a Cloud Service with SQL Database and Storage Account. During the process, it will create a Storage Account, SQL Database, and Cloud Service and change the configuration file (*.cscfg) of the project.
Creates a Windows Azure Website and links to a SQL Azure DB and a storage account. If the storage account specified does not exist, the storage account will be created.
Demonstrates backing up an Azure VM to an Azure storage account. The following script will connect to an Azure VM, stop the VM, back it up to a storage account, and start the VM.
This script demonstrates how to add a VM and script it to become a domain controller for a new forest, and add a member server to the domain, by adding them on the same VNet.
This runbook connects to SharePoint Online Admin site and display Urls of all provisioned site collections. It uses SPO Cmdlets Connect-SPOService and Get-SPOSite.
Adds a VM to the active subscription, based on SQL Server 2012 on Windows Server 2012 gallery image. Adds four disks to the VM and stripes them into two pools. Formats them for use, creates a database, putting the data files on one volume and the log files on the other.
This Runbook sample demonstrates the use of global assets in Automation. It shows how to retrieve an existing global variable, connection, certificate and credential.
Demonstrates starting all Microsoft Azure Virtual Machine in a specific Azure subscription by starting with the Microsoft Active Directory Domain Controllers. The script could be associated with the new Azure Automation Scheduler to start the Virtual Machines at specific time.
This runbook creates a number of Azure Environment Resources (in sequence): Azure Affinity Group, Azure Cloud Service, Azure Storage Account, and Azure VM all from an existing VM Image (specified as a Variable in the Assets).
This runbook copies a GitHub repository to the local sandbox running the runbook, similar to what "git pull" would do.
Demonstrates stopping a single Virtual Machine or set of Virtual Machines (using a wildcard pattern) within a Cloud Service. It does this by creating scheduled tasks to stop the Virtual Machine(s) on a schedule at the time specified.
Demonstrates starting a single Virtual Machine or set of Virtual Machines (using a wildcard pattern) within a Cloud Service. It does this by creating scheduled tasks to start the Virtual Machine(s) on a schedule at the time specified.
Script will walk you through checking if your database has been granted Permium database quota. Followed by how to upgrade reservations on a database to premium. **Note:** Premium database quota must be requested for your server via the Windows Azure Management Portal
Creates two virtual machines; a front-end Windows Server and a back-end MongoDB server. The front-end server is configured with the Web Platform Installer, which is then used to install IIS.
This module contains commandlets that install the required extensions and features to enable Enhanced monitoring for SAP Systems. Enhanced monitoring is needed to be supported by SAP.The module also contains a commandlet to check the current configuration of a Azure Virtual Machine.
Demonstrates stopping all Microsoft Azure Virtual Machine in a specific Azure subscription. The script could be associated with the new Azure Automation Scheduler to stop Virtual Machines at specific time. Great for developers for saving on Azure Compute, if they forget to shut.
This Azure Automation runbook provides a very simple "Hello World" example of using a runbook.
This set of runbook enables continuous deployment of a cloud service. It supports fresh deployment to an empty cloud service; direct in-place upgrade to Production slot; or vip swap after deploying to Staging slot. It supports multiple roles in one scale unit.
Creates a SQL Server with a firewall rule in a sub region. Once server is created then create a database on the server.
Copies files (in parallel) from a local folder to a named Azure storage blob container. The copy operation can optionally recurse the local folder using the -Recurse switch. The storage container is assumed to already exist unless the -CreateContainer switch is provided.
Enumerates all blobs in either one container or one storage account and sums up all costs associated. This includes all block and page blobs, all metadata on either blobs or containers.
This runbook connects into an Azure virtual machine and runs the specified PowerShell command.
Sets storage logging and metrics settings on storage accounts in the current subscription. Settings can be enable or disabled. **Note:** This script requires an Azure Storage Account to run. The storage account can be specified by setting the subscription configuration.
This runbook removes all blob contents from one storage account that are certain days old. By scheduling it to run on a regular basis, you will be able to reduce the operational cost.
This topic and the supporting Windows PowerShell Scripts walk you through creating a Windows Azure Virtual Machine that contains Microsoft SQL Server Business Intelligence features and Microsoft SharePoint. The procedures and scripts assume that you have a Windows Azure subscription, installation files for SQL Server 2012, and installation files for SharePoint 2010. The document includes a procedure to create virtual hard disks (.VHDs) to contain your installation files.
This topic describes and walks you through the deployment and configuration of a SQL Server Reporting Services native mode report server in a Windows Azure Virtual Machine. The steps in this document use a combination of manual steps to create the virtual machine and a Windows PowerShell script to configure Reporting Services.
Sign-up now and get $200 in Azure creditsStart today
Get up to $-,--- per year of Azure servicesActivate now
Join the BizSpark program and get free Azure servicesLearn more