Azure Automation Snippet Pack 2

I’ve updated the Azure Snippet Pack. It now includes a set of 40 Azure snippets (in the form of reusable functions and scripts) to get you started with Azure PowerShell automation.
There are snippets for user-, group- and role-management, ASC, authentication, installation, virtual machines, storage and SQL and all of them use either the Azure PowerShell AZ module or Azure CLI.




    • New-AzureContextFile
      • Login to Azure and save the current authentication information to use in PowerShell scripts
    • Use-AzureContextFile
      • Login to Azure via credential (context) File
    • Check-AZmodule
      • Check if the latest available Azure Powershell AZ modules are installedAzurePack2
    • Install-AZmodule
      • Install the AZ module (with auto-elevation)



    • Create-AzureVM
      • Creates a new Azure virtual machine with all necessary resources
    • Remove-AzureVM
      • Removes a virtual machine and all attached resources
    • List-VmSize
      • Retrieves a up-to-date list of all available Azure Virtual Machine sizes in a given location
    • List-VmSkus
      • Retrieves a up-to-date list of all Azure virtual machine offers and their SKUs for a certain or all publishers in a given location



    • New-AzureSQLDB
      • Creates a new SQL instance including firewall rule and database
    • New-GeoReplication
      • Configure an active geo-replication for a single database



    • Azure File Share Backup
      • Creates a backup for all file shares protected by Azure Backup in a subscription
    • Set-AzureBlobContent
      • Upload Files to an Azure blob


You can download the snippet pack here: CodeManager CMB File

  • The CMB-file can be installed quickly in CodeManager v7 via Snippet Backup->Restore.
  • It contains ISE-snippets, so you can use them directly in ISE, but they can be used with CodeManager with any editor (like VSCode) of course.
  • If you wish, you can open CMB files with any ZIP-capable program

Have a nice day!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s