Forum Discussion

Gautam51's avatar
Gautam51
Copper Contributor
May 02, 2024

Migration from Azure automation DSC to Automanage machine configuration

Hi, I have few Windows and Linux Azure VMs being managed by Automation DSC. An software agent is being downloaded and installed using powershell script and this is being done by DSC custom script. How can I migrate this setup to Automanage machine configuration, I have the powershell script to do the task but I am struggling to find information about how to configure this in machine configuration. Thanks.

1 Reply

  • Try below:

     

    1. Export Your DSC Configurations
      Use Export-AzAutomationDscConfiguration to pull your existing scripts from Azure Automation into your destination environment.
    2. Prepare Your Environment
      • Install PowerShell 7 
      • Install required DSC resources 
    3. Create a Machine Configuration Package
      • configuration.ps1
      • Required modules
      • metadata.json
      • Your PowerShell script becomes part of a configuration package
      • Use the Machine Configuration tooling to compile and validate the package
      • Package includes:
        • configuration.ps1
        • Required modules
        • metadata.json
    4. Publish the Package
      • Upload to a location accessible via HTTPS (e.g., Azure Blob Storage)
      • No need to compile MOF files 
    5. Assign Configuration to Machines
      • Use Azure Policy or CLI to assign the configuration to your VMs
      • For hybrid machines, onboard them to Azure Arc first

Resources