Azure Automation: Script for downloading and preparing AzureRM modules for Azure Automation!

Update from MSFT: 2/22/2016: To respond to a common user question, right now there is no timeline on when additional modules / new versions of modules will be shipped out of box in the Automation service. If you have additional requirements besides what we currently ship globally, these modules / module versions will have to be imported as user modules. Please note the new guidance is that if the latest version of any Azure/AzureRM module is imported as a user module to an automation account, the latest versions of ALL Azure/AzureRM modules (not just the ones that ship out of the box in Azure Automation) should be imported to the automation account, to avoid any version mismatch issues that could occur now or in the future if Azure Automation later ships any additional (or newer version) Azure/AzureRM modules as global modules.

 

Azure Automation has updated to WMF 5.0 which means that it is no longer required to required to change anything but zip the modules into zip files and upload!

I have simplified this script to do exactly that.

NOTE: The AzureRM Modules are automatically deployed in your account as global modules. Only import your own if you need a newer version or a module that is not shipped out-of-the box yet.

If you do decide to import your own, then please replace all the modules, to make sure you do not have any version mismatches.

this is the script:

Now Import Azure.profile, wait for it to show its activities and then afterwards import all other Azure /AzureRM Modules

image

NOTE: you can also import them directly from the new built in gallery:

clip_image002

Then use it in a runbook:

Need training in Service Management Automation (Same techniques can be used in Azure Automation)?

Next run in Stockholm,Sweden

http://labcenter.se/Workshop?ref=Jakob.Svendsen#lab=Windows_Azure_Pack_-_Mastering_Service_Management_Automation

Also available in Denmark, Norway and U.S.. Email me for info.

By | 2015-10-12T16:01:15+00:00 October 12th, 2015|Azure|7 Comments

About the Author:

Jakob Gottlieb Svendsen

Twitter: @JakobGSvendsen

Jakob Gottlieb Svendsen is a Microsoft Cloud and Data Center Management MVP (http://mvp.microsoft.com/en-us/default.aspx), Working as Global Lead Developer, Senior Consultant and Trainer at CTGlobal, where he is one of the driving forces in keeping CTGlobal a System Center Gold Partner and member of the System Center Alliance.

Since he started at Coretech in 2007, he has focused on Scripting and Development, primarily developing tools, extensions and scripts for the System Center Suite. His main area is Automation (including OMS/Azure Automation, Service Management Automation, PowerShell and Orchestrator). Another area is Windows Azure Pack / Azure Stack, where he does implementation, development, workshops and presentations. He is a world-wide renowned voice in the Automation field.

He is passionately devoted to the community, to which he contributes by being a moderator at TechNet and sharing his knowledge at http://blog.ctglobalservices.com/jgs

  • Co-founder: PowerShell User Group Denmark
  • Speaker at MMS 2016, Minneapolis (www.mmsmoa.com)
  • SCU Europe 2014, 2015, 2016 (www.systemcenteruniverse.ch)
  • Microsoft TechEd North America 2014, Houston
  • NIC 2012,2013,2014,2015, Oslo (www.nic.com)
  • Microsoft CampusDays 2011, 2013, Copenhagen
  • Microsoft TechDays 2015, Sweden (www.techdays.se)
  • Microsoft Partner Event: New in SC2012 SP1
  • User group meetings (PSUG.DK , SCUG.DK/BE/NO, AZMUG + more)
  • Microsoft Certified Trainer.
  • Microsoft Scripting Guys Forum Moderator

Main working areas:

  • Automation (Azure Automation, SMA, SCO)
  • Windows Azure Pack / Azure Stack
  • System CenterVisual Studio Team Services / Team Foundation Server
  • Development:C#.Net, VB.NET, VBScript, PowerShell, Service Manager, OpsMgr, ConfigMgr
  • Orchestrator
  • Windows Azure Pack / Azure Stack

Training:

  • Azure Automation
  • Service Management Automation
  • System Center Orchestrator
  • PowerShell, VBScript, C#.Net, VB.Net
  • Windows Azure Pack / Azure Stack Development Workshops

7 Comments

  1. Edward Shen October 13, 2015 at 20:05 - Reply

    Have you been able to successfully import all of the new cmdlets? I have used your script with limited success – some modules import ok, but others tend to freeze when extracting modules (it will show 0 loaded activities in the module). Does this sound right? The extracting process appears pretty long-winded as well, requiring more than 2 hours for me to upload half of the modules successfully!

    • Jakob Gottlieb Svendsen
      Jakob Gottlieb Svendsen October 26, 2015 at 21:12 - Reply

      sorry for the late reply, was trying to make a script for dowqnloading and installing all modules.
      but its Not ready for the public yet.

      I did check all of them, I must have missed one last time, Because I cannot get the APIManagement working. All the others seems to work fine.
      Only exception is that thre Azure.Storage needs to be added before the AzureRM.Storage, since AzureRM.storage relys on the other.

      I havent been able to find a reason why apimanagement is not working. Will keep trying and post solution if I succeed, before they are added as global modules automatically 🙂

  2. […] Upload the AzureRM.Resources Module to your Azure Automation account. MVP Jakob Gottlieb Svendsen has described the steps in detail in the following blogpost: http://blog.coretech.dk/jgs/azure-automation-script-for-downloading-and-preparing-azurerm-modules-fo… […]

  3. Ray Abueg January 29, 2016 at 23:58 - Reply

    Thanks for this info. Worked great, but since I used a more current version of Azure PowerShell (1.0.3), the procedure only works after uploading a current version of AzureRM.Profile since AzureRM.Resources_ depends on it.

  4. […] Right now there is no timeline on when additional modules / new versions of modules will be shipped out of box in the Automation service. If you have additional requirements besides what we currentl ship globally, these modules / module versions will have to be imported as user modules. Please note the new guidance is that if the latest version of any Azure/AzureRM module is imported as a user module to an automation account, the latest versions of ALL Azure/AzureRM modules (not just the ones that ship out of the box in Azure Automation) should be imported to the automation account, to avoid any version mismatch issues that could occur now or in the future if Azure Automation later ships any additional (or newer version) Azure/AzureRM modules as global modules. Instructions for importing the Azure/AzureRM modules as user modules can be found here: http://blog.coretech.dk/jgs/az… […]

  5. Christina Hunt May 4, 2017 at 8:49 - Reply

    You want to know about quality of Circuit Assembly and PCB Assembly Visit us We gives you the best details about this.
    Conformal coating

  6. their website September 11, 2017 at 17:05 - Reply

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 37147 additional Infos|Informations to that Topic: blog.ctglobalservices.com/azure/jgs/azure-automation-script-for-downloading-and-preparing-azurerm-modules-for-azure-automation/ [.…

Leave A Comment