This repository contains ARM templates and PowerShell scripts to automate the setup of Azure Automation and Update Management for your Azure environment.
- Overview
- Features
- Prerequisites
- Files in this Repository
- Installation
- Usage
- Functions
- Resources Created
- Troubleshooting
- Contributing
- License
This project provides tools to set up Azure Automation Update Management for Windows machines, including a workbook for monitoring update status, action groups for alerts, and metric alerts for update cycles.
- Create and manage Azure Automation accounts
- Set up Log Analytics Workspaces
- Connect VMs to Log Analytics Workspaces
- Configure Azure Update Management
- Deploy Azure Updates Dashboard Workbook and Alerts
- An active Azure subscription
- Azure CLI or Azure PowerShell installed
- Permissions to create resources in your Azure subscription
- PowerShell 5.1 or later
- Azure PowerShell modules (
Az.OperationalInsights
,Az.Automation
,Az.Resources
)
template.json
: Main ARM templateparameters.json
: Parameters file for the ARM templateAzureAutomationSetup.ps1
: PowerShell script for setup
-
Clone the repository:
git clone https://github.com/your-repo/azure-automation-update-management.git
cd azure-automation-update-management
-
Modify
parameters.json
with your environment-specific values.
- Deploy the template:
Using Azure CLI: az deployment group create --resource-group --template-file template.json --parameters @parameters.json
Using Azure PowerShell:
New-AzResourceGroupDeployment -ResourceGroupName <your-resource-group> -TemplateFile template.json -TemplateParameterFile parameters.json
- Verify deployment in the Azure portal.
Using PowerShell Script:
.\AzureAutomationSetup.ps1
- Follow the on-screen prompts to set up your Azure environment.
- Connect-ToAzure: Connects to Azure and sets the context
- Show-MainMenu: Displays the main menu options
- Invoke-Option1: Checks/creates Automation Account and lists Log Analytics Workspaces
- Invoke-Option2: Creates new Log Analytics Workspace and deploys
- Invoke-Option3: Enables Azure Update Management on existing LAW
- Connect-VMsToLAW: Connects VMs to Log Analytics Workspace
- Setup-AzureUpdateManagement: Sets up Azure Update Management
📖 Azure Workbook for Windows Update Summary
🔔 Action Group for alerts
If you encounter any issues during deployment:
- Check the deployment logs in the Azure portal
- Ensure all parameter values are correct
- Verify you have the necessary permissions in your Azure subscription
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU License - see the LICENSE file for details.
ℹ️ For more information, please refer to the Azure Automation documentation.
(c) g0hst 2022