Skip to content

shyguygang/az-updates-mgmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Azure Automation and Update Management Setup

Azure PowerShell

This repository contains ARM templates and PowerShell scripts to automate the setup of Azure Automation and Update Management for your Azure environment.

📋 Table of Contents

📋 Overview

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.

✨ Features

  • 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

🏁 Prerequisites

  • 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)

📁 Files in this Repository

  • template.json: Main ARM template
  • parameters.json: Parameters file for the ARM template
  • AzureAutomationSetup.ps1: PowerShell script for setup

💾 Installation

  1. Clone the repository:

    • git clone https://github.com/your-repo/azure-automation-update-management.git
    • cd azure-automation-update-management
  2. Modify parameters.json with your environment-specific values.

🚀 Usage

Using ARM Templates:

  1. 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
  1. Verify deployment in the Azure portal.

Using PowerShell Script: .\AzureAutomationSetup.ps1

  1. Follow the on-screen prompts to set up your Azure environment.

🔧 Functions

  • 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

📦 Resources Created

📖 Azure Workbook for Windows Update Summary 🔔 Action Group for alerts ⚠️ Metric Alerts for update cycles 🔗 Linked service connecting Automation account to Log Analytics workspace

🆘 Troubleshooting

If you encounter any issues during deployment:

  1. Check the deployment logs in the Azure portal
  2. Ensure all parameter values are correct
  3. Verify you have the necessary permissions in your Azure subscription

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📃 License

This project is licensed under the GNU License - see the LICENSE file for details.

ℹ️ For more information, please refer to the Azure Automation documentation.

👤 Author

(c) g0hst 2022

Releases

No releases published

Packages

No packages published