This directory contains PowerShell scripts for automating the governance and compliance management of Azure resources, specifically designed for ICT governance frameworks.
The ICT Governance Framework Automation tools provide capabilities to:
You can install the required modules using:
Install-Module -Name Az.Accounts, Az.Resources, Az.PolicyInsights -Force
# Import as a module
Import-Module .\ICT-Governance-Framework.ps1
# Or run directly
.\ICT-Governance-Framework.ps1
Initializes the governance framework by creating necessary directories and loading configurations.
Initialize-GovFramework -CustomConfigPath ".\custom-config.json"
Connects to Azure using different authentication methods.
# Interactive login
Connect-GovAzure
# Use Managed Identity
Connect-GovAzure -UseManagedIdentity
# Connect to specific tenant
Connect-GovAzure -TenantId "your-tenant-id"
Retrieves a summary of Azure Policy compliance.
# Get compliance for current subscription
$compliance = Get-GovPolicyComplianceSummary
# Get compliance for specific subscription
$compliance = Get-GovPolicyComplianceSummary -SubscriptionId "your-subscription-id"
# Export to file
Get-GovPolicyComplianceSummary -OutputPath ".\compliance-summary.json"
Gets a list of resources that are non-compliant with Azure Policies.
# Get non-compliant resources in current subscription
$nonCompliant = Get-GovNonCompliantResources
# Get non-compliant resources in specific resource group
$nonCompliant = Get-GovNonCompliantResources -ResourceGroupName "your-resource-group"
# Export to file
Get-GovNonCompliantResources -OutputPath ".\non-compliant.json"
Generates an HTML dashboard report for governance metrics.
# Generate dashboard for current subscription
$reportPath = New-GovDashboardReport
# Generate dashboard for specific subscription
$reportPath = New-GovDashboardReport -SubscriptionId "your-subscription-id"
# Specify custom output path
$reportPath = New-GovDashboardReport -OutputPath ".\custom-dashboard.html"
Creates a CSV report assessing resources against governance standards.
# Generate assessment for specific subscription
$assessmentPath = New-GovAssessmentReport -SubscriptionId "your-subscription-id"
# Specify custom output path
$assessmentPath = New-GovAssessmentReport -SubscriptionId "your-subscription-id" -OutputPath ".\custom-assessment.csv"
The framework creates the following directory structure:
governance-logs/
- Contains log files with operation historygovernance-reports/
- Contains generated reports and dashboardsgovernance-templates/
- Contains templates for reports and dashboardspolicy-definitions/
- Contains custom policy definitionsThe ICT Governance Framework now includes comprehensive automated remediation capabilities to address compliance violations automatically, reducing manual intervention and response times.
.\Deploy-AutomatedRemediation.ps1 -ResourceGroupName "rg-governance-automation" -Location "East US" -Environment "Development"
.\Automated-Remediation-Framework.ps1 -ConfigPath ".\remediation-config.json" -Environment "Development" -DryRun
governance-reports/
governance-logs/
remediation-config.json
: Main configuration for remediation rules and settingsAutomated-Remediation-Framework.ps1
: Core remediation engineDeploy-AutomatedRemediation.ps1
: Infrastructure deployment scriptFor detailed implementation guidance, see Automated-Remediation-Implementation-Guide.md
Contributions to improve the ICT Governance Framework Automation are welcome. Please follow these steps:
This project is licensed under the MIT License - see the LICENSE file for details.