This guide will help you quickly get up and running with the Azure PowerShell Toolkit.
# Check PowerShell version (requires 7.0+)
$PSVersionTable.PSVersion
# Install PowerShell 7 if needed
# Windows: winget install Microsoft.PowerShell
# macOS: brew install powershell
# Linux: See https://docs.microsoft.com/powershell/scripting/install/installing-powershell-linux# Install the latest Azure PowerShell module
Install-Module -Name Az -Force -AllowClobber -Scope CurrentUser
# Verify installation
Get-Module -Name Az -ListAvailable# Connect to Azure (opens browser for authentication)
Connect-AzAccount
# Select subscription
Set-AzContext -SubscriptionId "your-subscription-id"# Using service principal for automation
$cred = Get-Credential
Connect-AzAccount -ServicePrincipal -Credential $cred -TenantId "your-tenant-id"# Use managed identity on Azure VMs
Connect-AzAccount -Identity# Run the main launcher
./Launch-AzureToolkit.ps1# Get all VMs in subscription
./scripts/compute/Azure-VM-List-All.ps1
# Get VMs in specific resource group
./scripts/compute/Azure-VM-List-All.ps1 -ResourceGroupName "rg-production"# Create storage account
./scripts/storage/Azure-StorageAccount-Provisioning-Tool.ps1 `
-ResourceGroupName "rg-storage" `
-StorageAccountName "mystorageaccount" `
-Location "East US"# Get cost analysis
./scripts/cost/Azure-Cost-Anomaly-Detector.ps1 -SubscriptionId "your-subscription-id"# Run security scan
./scripts/identity/Get-NetworkSecurity.ps1 -ResourceGroupName "rg-production"Scripts are organized by Azure service category:
- Compute - VMs, containers, app services
- Storage - Storage accounts, databases, data services
- Network - Virtual networks, load balancers, security
- Identity - Azure AD, RBAC, security policies
- Monitoring - Alerts, logs, diagnostics
- Cost - Cost analysis, optimization, budgets
- DevOps - CI/CD, automation, deployment
- Backup - Data protection, disaster recovery
- Migration - Cloud migration tools
- AI - AI services, machine learning
- IoT - IoT Hub, device management
- Utilities - General tools and helpers
Most scripts support these common parameters:
-ResourceGroupName- Azure resource group-Location- Azure region (default: East US)-SubscriptionId- Azure subscription ID-Verbose- Enable detailed output-WhatIf- Preview actions without executing-Confirm- Prompt for confirmation
# Always test with -WhatIf first
./scripts/compute/Azure-VM-Deletion-Tool.ps1 -VMName "test-vm" -WhatIf# Organize resources in logical groups
New-AzResourceGroup -Name "rg-webservers" -Location "East US"# Enable script logging
Start-Transcript -Path "azure-operations.log"
# Run your scripts
Stop-Transcript# Never hardcode credentials
$cred = Get-Credential
# Or use Azure Key Vault
$secret = Get-AzKeyVaultSecret -VaultName "my-vault" -Name "my-secret"Module Not Found
# Install missing module
Install-Module -Name Az.Compute -ForceAuthentication Expired
# Refresh authentication
Connect-AzAccountPermission Denied
# Check your Azure RBAC permissions
Get-AzRoleAssignment -SignInName "your-email@domain.com"# Get help for any script
Get-Help ./scripts/compute/Azure-VM-List-All.ps1 -Full
# Show examples
Get-Help ./scripts/compute/Azure-VM-List-All.ps1 -Examples- Explore the
/scripts/directory for available tools - Read the category-specific documentation in
/docs/ - Try the AI Assistant:
./AI-Assistant.ps1 - Set up automated monitoring with scripts from
/scripts/monitoring/
Happy automating!