Microsoft Dynamics AX in Azure Runbook code samples for resource managment


Microsoft Dynamics AX on Microsoft Azure is enabling great new opportunity for customers and partners to achieve incredible business agility. One of the key areas of future investment for Microsoft Dynamics AX is to deliver solutions through Microsoft Dynamics LifeCycle Services(LCS) that harness the power of Microsoft Azure elasticity. Specifically providing customers and partners tools and services to manage their environments efficiently in Microsoft Azure through simple capabilities through LCS. Because customer and partner feedback is important to us we are initially providing a set of powershell scripts that leverage Azure Automation through Runbooks capabilities as the first step in this journey. The scripts tackle as set of scenarios around more efficiently managing compute resources in Demo, Develop and Test topologies.

The Scripts are as follows;

  • Start-AllAzureVMDevTest.ps1 -  Connects to Azure and starts all VMs in the specified Azure subscription and deallocates their cloud services (For DEV/Test Topologies).
  • Stop-AllAzureVMTestDev.ps1 - Connects to Azure and shuts down all VMs in the specified Azure subscription and deallocates their cloud services (For DEV/Test Topologies).
  • StartExSet.ps1 - Connects to Azure and starts Specific VMs excluding the VM's in the specified AV Set.
  • StopExSet.ps1 - Connects to Azure and shuts down all VMs excluding the ones in the specified AV set
  • StartExVM.ps1 - Connects to Azure and starts Specific VMs not within the specified exception list in the specified Azure subscription.
  • StopExVM.ps1 - Connects to Azure and shuts down all VMs excluding the defined in the List.
Also include in the .zip file are instructions on the usage of these scripts with LCS deployed Dynamics AX environments. If you have Dynamics AX deployments through LCS please give these samples a try and provide feedback to us on http://connect.microsoft.com or http://lcs.dynamics.com [smiley face] feedback link. Please note these scripts assume the AX deployment was done through LCS.
 
Moving forward we will be integrating the capabilities exposed through these runbooks directly into LCS Cloud Hosted Environments.
To download the sample scripts and documentation please click here to go to TechNet.


Comments (4)

  1. Anup Shah says:

    Wow, just what I have been looking for! Thank you for sharing this. I have been using Windows task scheduler to stop and start my LCS deployed VMs to date. Now I can run this directly in Azure via Runbook.

  2. SteeveG says:

    We currently shutdown our Dev VM during the night when they are not used.  We start then back in the morning.  But for the first 1 or 2 hours, the developpers are experiencing slowness.  Is there something we can do about that?  I'm pretty sure it's SQL Server building back it's cache.  I'm wondering if I could run some script to force the DB in memory.  I'm using a Standard A6 VM.

  3. multiple subscriptions says:

    How to limit this to only handle all machines within 1 azure subscriptionid. We have a lot of subscriptions but would like to limit this to 1 subscription id

  4. Claus Andersen, EG says:

    @multiple subscriptions: I Believe you specify the Subscription ID in the playbooks (in the Script code), so if you need to run the playbook for multiple ID's you also need multiple playbooks (or "merged" playbook handling all ID's).

Skip to main content