smsagent.blog
  • docs.smsagent.blog
  • Custom Reporting in Microsoft Intune
    • Delivery Optimization Report
    • Windows Update for Business Custom Reporting
      • Power BI Report Walkthrough
      • Known issues / limitations
      • Change log
      • Deploy the solution
        • Create Azure Resources
        • Configure Azure Resources
        • Deploy the client-side script
        • Deploy the Azure automation runbooks
        • Configure the Power BI report
      • Adding additional language support
      • Table schema reference
    • Automating Data Exports from Microsoft Graph
      • Azure Automation account
        • Create / configure an Azure automation account
        • Grant API permissions
        • Create an Azure automation runbook
      • Azure Storage account
      • Automate Data Export to Azure Storage Account
      • Automate Data Export to Azure Monitor Logs
      • Creating / Troubleshooting Runbooks
      • Power BI
        • Connect Power BI to an Azure storage account data source
        • Connect Power BI to an Azure log analytics workspace as a data source
    • Managed Devices Report
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create a PowerBI report
      • MEM Managed Device Report template
      • Bonus! Unhealthy MEMCM Clients email report
    • Intune Assignments Report
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create a Power BI report
      • Change log
    • Patch My PC Report
      • A look at the Power BI reports
      • Change log
      • Video guides
      • Things to know
      • Create / configure an Azure automation account
      • Grant API permissions
      • Create / configure an Azure storage account
      • Create an Azure automation runbook
      • Create the Power BI report
      • Feedback
    • Windows 11 Hardware Readiness Report
    • Gathering Custom Inventory with Intune
      • Set up the Azure Resources
      • Create a Proactive remediations script package
      • Create a runbook
  • PowerShell Scripts Online Help
    • Get-AzSubscriptionActivityLog
  • Azure Solutions
    • Automated Azure Table Storage Backups
      • Change log
      • Deploy the solution
        • Create the Azure resources
        • Set the backup schedule
        • Add storage tables to the backup
        • Add role assignments to the storage account/s
        • Create a lifecycle management rule
      • Run a manual backup
      • Restore a backup
Powered by GitBook
On this page
  • Video guide
  • Import Modules
  • Create a Runbook
  • Schedule the Runbook

Was this helpful?

  1. Custom Reporting in Microsoft Intune
  2. Automating Data Exports from Microsoft Graph
  3. Azure Automation account

Create an Azure automation runbook

PreviousGrant API permissionsNextAzure Storage account

Last updated 3 years ago

Was this helpful?

Video guide

Here is a video guide which I created for the Patch My PC report which covers the steps outlined below.

Import Modules

If you wish to export data to an Azure storage account, you will need a couple of PowerShell modules added to the automation account for the runbook to use.

  • In the Azure portal in the automation account, go to the Modules gallery pane

  • Search for and import the following modules:

    • Az.Accounts

    • Az.Storage

Create a Runbook

  • Click on the Runbooks pane and choose Create a runbook

  • Enter a name for the runbook, select PowerShell for the runbook type and click Create

    • If you wish to test the runbook before publishing to make sure it works, use the Test pane

    • Alternatively, Publish the runbook, then click Start from the runbook menu. This option will give you the full output of the script.

  • When ready, Publish the runbook

Schedule the Runbook

Schedule the Runbook to execute at regular intervals to keep the data updated.

  • In the Azure portal, in the automation account, open the Runbook you created

  • Click Link to schedule

  • In the Schedule section, select an existing schedule or create a new one

Here you can enter your PowerShell code. To get started, check out the included examples for and .

exporting to an Azure storage account
exporting to a Log analytics workspace