There are no reviews yet. Be the first to send feedback to the community and the maintainers!
runbooks
Sample Automation runbooksazure-automation-ise-addon
The Azure Automation PowerShell ISE Add-On makes it easy to author and test your runbooks in your local PowerShell ISEautomation-packs
Collections of Automation resources that can include runbooks, configurations, modules, credentials, schedules, variables, connections, certificates, jobs, compilation jobs, and nodes.python_emulated_assets
This python module enables the development and testing of Azure Automation python runbooks in an offline experience using the built in Automation assets (variables, credentials, connections, certificates)azure_automation_utility
Contains a python package to make it easier to author Python within Azure Automationgraphical-runbook-tools
stopstartazurevm--scheduled-vm-shutdownstartup-
This PowerShell Workflow runbook connects to Azure using an Automation Credential and Starts/Stops a VM/a list of VMs/All VMs in a Subscription in-parallel.vststasks
Visual Studio Team Services tasks for integrating with Azure AutomationStop-Azure-VM-On-Alert
scheduled-virtual-machine-shutdownstartup
Automates the scheduled startup and shutdown of Azure virtual machines. Schedules are implemented by tagging VMs or resource groups with individual simple schedules. Schedules can define multiple time periods for shutdown, including time ranges and days of week or dates.start-azure-v2-vms
This Graphical PowerShell runbook connects to Azure using an Automation Run As account and starts all V2 VMs in an Azure subscription or in a resource group or a single named V2 VM. You can attach a recurring schedule to this runbook to run it at a specific time. The assoazure-sql-database-scale-using-scheduled-autoscaling
Vertically scale an Azure SQL Database up or down according to a schedule using Azure Automation.Create-Automation-Linux-HybridWorker
This runbook aids users in Creating Linux User Hybrid workers. This script must be executed on a Run As Enabled Automation Account only.list-all-expiring-soon-certificates-in-azure-application-gateway
Did you ever had developers or engineers coming to your desk in panic realizing their Azure Application Gateway' certificates expired without them knowing it in advance. Causing them downtime in their release pipeline, dev or worst, their production environment!update-management-turn-on-vms
This is an example script for Update Management pre/post actions. It requires the ThreadJobs module. starts VMs which aren't currently running to install updates. It can be used in conjunction with UpdateManagement-TurnOffVMs to turn off the machines which were started.Delete-Azure-VM-On-Alert
identify-automation-runasaccount-runbooks
A runbook to find all the runbooks in a given automation account which are using run as account. This runbook can be run inside an automation account as a runbook job. It requires subscription id, resource group name, and automation account name as input parameters. It uses automation account's system identity.automated-active-directory-test-domain-deployment-runbook
This runbook automates the provisioning of a new AD domain/forest in Microsoft Azure for testing purposes. Given an Azure subscription and an account that has access, the runbook creates a new cloud service and virtual machine along with a new storage account and virtual network.update-management
Samples for using the update management capabilities in Azure AutomationRestart-Azure-VM-On-Alert
Create-Automation-Windows-HybridWorker
This runbook aids users in Creating Windows User Hybrid workers. This script must be executed on a Run As Enabled Automation Account only.ScaleUp-Azure-VM-On-Alert
Preqrequisite-for-Migration-from-Azure-Automation-Update-Management-to-Azure-Update-Manager
This Powershell script is designed to carry out the prerequisites required for migration of machines and update schedules from Azure Automation Update Management to Azure Update Manager.ScaleDown-Azure-VM-On-Alert
indexes-tables-in-an-azure-database-if-they-have-a-high-fragmentation
This runbook indexes all of the tables in a given database if the fragmentation is above a certain percentage. It highlights how to break up calls into smaller chunks, in this case each table in a database, and use checkpoints.Please read the runbook for additional information.cleanup-sql-server-firewall-rules-and-log-to-application-insights
This runbook is designed to purge Azure SQL Server firewall rules not specified on a defined safe list & log the outcome in App Insights for audit purposes. A runbook like this should be implemented to regularly delete white-listed IP addresses as standard security practiceupdate-management-turn-off-vms
This is an example script for Update Management pre/post actions. It stops VMs which were started to install updates. It must be used in conjunction with UpdateManagement-TurnOnVMs. It requires the module "ThreadJobs"tag-based-vm-automatic-startup-and-shutdown-with-dependency-rules
This script can be used as Azure Runbook (scheduled / on demand) to stop/start VMs. It uses tags in an intelligent way to automate this.You'll give your VMs a startup and shutdown tag in hh:mm format, which defines the window in which the VM should be running.Optionally, you canstart-azure-vms-in-order-or-stop-in-reverse-order
Start Azure VMs in order or stop them in reverse order. The script requires two parameters: action and JSONConfigFile. The action is start, stop, or test. The JSONConfigFile is the URL link to the JSON configuration file.newazuretestvm-add-a-new-vm-to-your-domain-on-azure
I wanted to deploy Server 10 VM joined to my domain and leveraged Azure Automation to do that. So now when I need a new VM, just have to invoke the Runbook and a domain joined new server is ready in well over 10 minutes.I have a blog post explaining how this works too.check-ssl-expiration-and-notify-per-mail-azurerm
This runbook will check all certificates, within your subscription, on expiration date.By default it uses sendgrid for mail notifications whenever a certificate hits the given treshold.Please leave me feedback when you feel like this runbook needs improvements.Obvioprocess-azure-alerts-sent-through-a-webhook-in-python
Processes a webhook sent from an Azure alert.This Azure Automation sample runbook runs on Azure to process an alert sent through a webhook. It converts the RequestBody into a Python object by loading the json string sent in.Migrate-from-Azure-Automation-Update-Management-to-Azure-Update-Manager
This Powershell script is designed to migrate machines and schedules onboarded to the legacy Azure Automation Update Management solution to the latest Azure Update Manager.sending-email-from-azure-automation-using-office-365--secure-smtp-
This script demonstrates how to send an email from Microsoft Azure automation using secure SMTP for sending the mail. In this setup the script is sending mails using Microsoft Office 365. This is could a nice feature to have to inform someone that Azure Automation just performcreate-an-rdcman--.rdg--file-in-an-azure-automation-workflow
Create an Remote Desktop Connection Manager (.rdg) file in an Azure Automation Workflow - containing all the RDP endpoints of your VMs.export-azure-resource-manager--arm--role-based-access-control--rbac--assignments
This script allows you to export the current Azure Resource Manager (ARM) Role Based Access Control (RBAC) Permissions.It will loop through all subscriptions that you have access to and export the permissions.It will create an individual CSV file on the desktop per subscription.Teasy-stopstart-for-websites--app-services-
This script stop/starts websites (app services) just by given a WebApp Name.configure-azure-backup-using-powershell
This script will help you to configure your Azure hosted VM backups through PowerShell.update-azure-site-2-site-vpn-remote-ip-address
Update Azure Site 2 Site VPN Remote IP AddressThis Script will Download the current Virtual Network Configuration from Azure.(You must first have connected to your Azure Subscription).Then it will look up your current Gateway IP Address and detect if there has been any change comrotate-azure-storage-account-keys
Powershell function which is intended to rotate the storage account keys and store them as a secure string in the key vault, in the form of the secret.Keeping security in mind, our secrets are worthless if they are rotated frequently, which is giving the hacker very less attack fstop-azure-virtual-machine-using-azure-automation-runbook
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 shutcopies-a-blob-or-all-files-in-a-container-from-an-azure-storage-account-locally
Copies a blob or all files in a container from an Azure storage accountto a local directory.domain-joining-windows-azure-virtual-machines-on-provision
This example shows how to configure domain join when provisioning virtual machines using the Windows Azure PowerShell cmdlets. It is a requirement to have Active Directory connectivity already in place for this sample to work.scale-an-azure-sql-db-to-a-specified-edition-and-tier
This runbook scales an Azure SQL Database to the specified edition and tier. You can look up the available editions and tiers on https://azure.microsoft.com/en-us/documentation/articles/sql-database-service-tiers/sql-azure-firewall-management
Script will walk you through adding or replacing firewalls for SQL databases within Subscriptions. By default, the script enumerate subscriptions , servers, and databases unless specified otherwise.remove-python-2-package-from-automation-account
This Azure Automation runbook runs in Azure to remove a package from Azure Automation.It requires the subscription id, resource group of the Automation account, Automation name, and package name as arguments.Passing in * for the package name will remove all packages.windows-azure-s2s-vpn-with-dynamic-public-ip
When you configure your Azure S2S VPN network, you will have to specify your ISP Internet public IP. If your ISP provides you a public IP that is changing every x days, you will have to update public IP manually into Azure Web Interface. Lat automate this with PowerShell.-deprecated--start-all-azure-vms--arm-and-asm--in-a-subscription
This runbook connects to Azure and starts all VMs (ASM and ARM) in the specified Azure subscription. You can attach a schedule to this runbook to run it at a specific time. A pretty simple runbook to start with Azure Automation.migrate-a-virtual-machine-to-windows-azure-using-powershell
This example uploads two VHD files to a Windows Azure Storage Account using the Add-AzureVHD cmdlet. Once uploaded it then creates the disk references and then creates a new Windows Azure VM based off of the disks.peering-virtual-networks-using-latest-azure-power-shell-module
VNet Peering allows two VNets in the same region or other region to connect with each other without having to set up the VPN Gateways.example-showing-how-to-download-a-runbook-from-an-azure-automation-account
Example showing how to download a runbook from an automation account so you can call it from a parent python script.extract-azure-arm-resource-counts-and-quota-information
This script can be used to export all providers and resource type counts to a csv file along with the ARM VM quota information for each active Azure location.Please update the file path variable to the required location depending on your system set-up.An out-gridview will be dispazure-enable-hybrid-use-benefit-on-all-vms-in-all-subscriptions
PowerShell script to automate Enabling Azure Hybrid Use Benefit on All Windows VMs in All Subscriptions. The default mode for the script is "Simulate Mode", where no changes are made and Log and CSV Export files are generated, this shows "What changes the script would make" if yallows-only-one-instance-of-a-runbook-job-to-run-at-any-one-time
This runbook ensures that only one instance of a runbook is running at any one time. It is meant to be called from another runbook as an inline runbook, not started asynchronously through the web service. Please look at the Set-RunbookLockSample runbook for example usage.suspend_resume_pbiembedded-by-single-resource
This script suspends/Resume the PowerBI Embedded Capacity in Azure by a given PBE resource name.Pre-Requisites Install AzureRM.PowerBIEmbedded moduleYou have to create your automation account as Run As Account feature, sine this script uses AzureRunAsConnection for authenticcheck-ssl-expiration-and-runasaccounts-notify-per-mail-az
This runbook will check all certificates, within your subscription, on expiration date. It now checks for the expiry of your RunAsAccounts as well. By default it uses sendgrid for mail notifications. @bramstoopcomstart-all-vms-in-specified-azure-resource-group
This sample runbooks starts all of the virtual machines in the specified Azure Resource Group. For more information about how this runbook authenticates to your Azure subscription, see the Microsoft documentation here: http://aka.ms/fxu3mn.add-a-new-key-to-a-key-vault
This runbook shows how to add a new key to an existing Key Vault. It requires an Azure Run As account and additional modules, see the PREREQUISITE sections in the runbook for details. The runbook will use the Run As account to authenticate against Key Vault. The Key Vault's accazure---office365-available-and-consumed-licenses-report-for-ms-partners
Azure platforms and Office365 licensing report for MS partners using the delegated admin method.powershell-search-azure-storage-table-wrapper
This PowerShell function simplifies using the Azure Storage Table Search facilities described in the Azure Storage PowerShell Guide. It also enables PowerShell pipelining so that functions further down the pipeline can begin processing results while additional entities are downazure-identify-and-optionally-delete-orphaned-disks
PowerShell script to automate identifying "Orphaned Disks" in an Azure subscription. An Orphaned Disk is a Disk that does NOT have an "Active Lease" (Unmanaged Disks) or does NOT have a "ManagedBy" property set to a VM (Managed Disks). The script outputs information to a log filchange-the-content-type-of-multiple-types-in-azure-blob-storage-powershell-
Change the content type of multiple types in Azure blob storage(PowerShell)Introduction This powershell script changes the content type of multiple files or single file located in an Azure Blob storage to different content types depending on their extension and the rules set inpowershell-script-to-deploy-storsimple-ova--onpremises-virtual-array--on-hyperv
In January 2016 Microsoft rleased a StorSimple On-Premises Virtual Array that can be deployed on Hyper-V or VMWare. Manual installation notes are here. This script automates the process of feploying the provided VHD image to an on-premises Hyper-V (2012 R2) host.For more informaextract-user-list-from-azure-active-directory-to-an-excel-file
Want to know about innovative and interesting ideas in Azure and automation? Check out my blog:Â https://manjunathrao.com/This script will authenticate to your Azure Active Directory and fetch all the user details. Finally, it will save the details to the excel sheet.Below are theupdate-management-run-script-locally
This script is intended to be run as a part of Update Management Pre/Post scripts. This script will run an Azure Automation runbook via a hybrid worker, allowing for local execution of a script. It requires a System Managed Identity and a hybrid worker configured on the machine.stop-all-vms-in-specified-azure-resource-group
SYNOPSIS     This PowerShell Workflow script, intended to run in an Azure Automation runbook, stops all the Azure VMs in a specific Azure Resource Group.DESCRIPTIONThis sample runbooks stops all of the virtual machines in the specified Azure Resource Group. For more informatiostarts-virutal-machines-in-a-subscription-using-python-from-azure-automation
Starts Azure resource manager virtual machines in a subscription. An Azure Automation RunAs account is required for this runbook.This Azure Automation runbook runs on Azure to start Azure vms in a subscription.enabledisable-azure-hybrid-benefit-ahub--for-windows-vm-and-windows-vmss
This PowerShell Script Enables/Disables Azure Hybrid Benefit for Virtual Machine/Virtual Machine Scalesets in a given Subbscription/Resource Group or individual Resources.More of AHUB Benefit here : https://azure.microsoft.com/en-us/pricing/hybrid-benefit/create-new-azure-vm-endpoint
This runbook creates a simple new Stand-Alone Azure Endpoint for a specified Virtual Machine.import-python-2-packages-from-pypi-into-azure-automation-account
Imports python packages from pypi.orgThis Azure Automation runbook runs in Azure to import a package and its dependencies from pypi.org.It requires the subscription id, resource group of the Automation account, Automation name, and package name as arguments.stop-azure-v2-vms-001
This PowerShell runbook connects to Azure and stops all VMs in an Azure subscription or cloud service. You can attach a schedule to this runbook to run it at a specific time.create-a-new-virtual-machine--vm--on-azure
This Azure Automation runbook creates a new Virtual Machine (VM) on Azure using New-AzureQuickVM cmdlet which is available in Azure module. Given a certificate which is used to connect to your subscription, Subscription Id and OS Name(that is available in VM Gallery), the runbothis-runbook-would-install-windows-roles-and-features-on-any-azure-vm
This runbooks installs a Windows feature on a virtual machine. These features are typically installed using server manager. The feature would be installed and if the feature demands a reboot, the virtual machine will reboot automatically.send-a-mail-of-password-about-to-expire-in-azure-ad-using-azure-automation
This Azure Automation runbook looks up a user in Azure active directory and determines if their password is about to expire. If it is, it can optionally send an email to the user. You need to import the MSOnline module from the Automation module gallery.powershell-script-to-display-all-azure-datacenter-ip-subnets-ranges
Powershell script that will extract Azure IP Region IP Ranges from Microsoft Azure Datacenter IP Ranges xml document that is updated every Wednesday.azure-rbac-report
The script will enumerate and report Azure subscription RBAC definitions and assigned users.By default, the script will not report on Roles with no users enrolled. This can be overwritten with the excludeEmptyroles parameter..\RBACReport.ps1 -ExcludeEmptyRoles $falseThe report wiaudit-azure-subscription-rbac-assignments
If you need to audit/log Azure permissions, this is it. I created this script to help perform a RBAC audit for a Azure subscription. This script resolves all RBAC assignments, then expand every group to retain only resolved users. It is build so that you can take the output and dassign-multiple-aad-users-to-multiple-roles-in-multiple-subscriptions
Interactive Powershell script to add multiple users & groups to multiple roles across multiple subscriptions. Search Azure AD and select multiple users & groups, select multiple roles to apply and select multiple subscriptions.run-tasks-on-azure-virtual-machines-using-the-custom-script-extension
This Azure Automation runbook can be used to push a script or scriptblock to an Azure VM using the Custom Script extension component of the Azure VM Agent. This allows scripts to be run on Azure VM's without the need for the PowerShell Endpoint being enabled and WinRM configured.azure-analysis-services-scale-and-pause-or-resume-using-scheduled-autoscaling
Vertically scale up and down or pause/resume an Azure Analysis Services server according to a schedule using Azure Automation.generate-azure-vm-size-availability-matrix
This PowerShell script allows you to export a matrix of the availability of VM sizes per location in Microsoft Azure. The availability matrix will be in CSV format and gives you clear insight on which VM sizes are available in which Azure location.addazurermanalysisservicesfirewallrule
Add-AzureRmAnalysisServicesFirewallRule is a small powershell script that uses the the Set-AzureRmResource cmdlet to dd firewall rules to an Azure Analysis Service instance.Once you run it, the script will ask you for:The resource group name where the Analysis Service is deployedazure-unused-vhd-report
The script will go through your Azure subscription and find all vhd’s on storage accounts. It will match those that are attached to the virtual machines to those found. This way you can determine if you have orphaned vhd’s that are no longer use by virtual machine.iis-data-tier-update-script-for-asr-recovery-plan
Runbook to run a custom script inside an Azure Virtual Machine. This script needs to be used along with recovery plans in Azure Site Recovery.Runs this PowerShell script to update connection sring on IIS server.  Download IIS-Update-ConnectionString.ps1 script from hereenable-replication-vm-for-hyperv-cluster
With this Powershell script I'll Check if there are any replication problems on the Current VM's and wiil place the named VM in the variable as a new Virtual Machine Replication to my DR Hyper-v Site. The script Check if both Hyper-v Cluster nodes are Replica enabled.setazurewebappalwayson
This script can be used during code deployment in Microsoft Azure WebApp. It be design to force AlwaysOn activation and It supports Slot deployment.You can set multiples params :[-ResourceGroupName(Mandatory)] [-WepAppName(Mandatory)] [-AlwaysOn(Mandatory)] [-Slot(Optionnal)]Whatintegrating-azure-automation-with-event-grid
This sample Automation runbook integrates with Azure event grid subscriptions to get notified when a write command is performed against an Azure VM. The runbook adds a cost tag to the VM if it doesn't exist. It also sends an optional notification to a Microsoft Teams channel.update-management-run-script-with-run-command
This script is intended to be run as a part of Update Management Pre/Post scripts.It will run a script locally on an Azure VM using the Run Command functionality. It requires the module "ThreadJob" from the PowerShell Gallery.custom-deploy-azure-vm
The script provides you with a Graphical interface to easily redeploy VM from existing vhd’s or managed disk. It also allows you to easily deploy a VM from a customized image which is currently not available in the Azure Portal GUI.When deploying from a custom image, only managedoffice-365-tenant-details
This script is used to quickly retrieve all of the basic details about your Office 365 tenant and put them at your fingertips. If you are a tenant admin, or a Microsoft partner who administers tenants for your customers, this can save you a good bit of time.stop--start-all-or-only-tagged-azure-vms-in-parallel
This PowerShell Workflow Runbook connects to Azure using an Automation Run As account, retrieves the power status of Azure VMs and turns off / on in parallel those that are turned on / off. You can attach a recurring schedule to this runbook to run it at a specific time.expressroute-builder
ExpressRoute Builder README notes.Script written by: Robert BarnesDate written: 20/03/2017Version Number: V0.2Github URL: https://github.com/robertraybarnes/PowerShell-Scripts/blob/master/ExpressRoute%20Builder%20PowerShell%20Script%20for%20Azure This script is designed to deployLove Open Source and this site? Check out how you can help us