0
votes

I have a PowerShell script and would like to use az lab vm -apply-artifacts to add the artifacts to VM. Could anyone please give me an example artifact Json file and how to call it from Azure CLI? Thanks a lot!

1

1 Answers

0
votes

give me an example artifact Json file and how to call it from Azure CLI?

The following example shows the sections that make up the basic structure of a definition file:

{
  "$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2016-11-28/dtlArtifacts.json",
  "title": "",
  "description": "",
  "iconUri": "",
  "targetOsType": "",
  "parameters": {
    "<parameterName>": {
      "type": "",
      "displayName": "",
      "description": ""
    }
  },
  "runCommand": {
    "commandToExecute": ""
  }
}

And you cuold get a sample artifacts.json definition file. Check out the artifacts created by the DevTest Labs team in GitHub repository.

Apply artifacts to a virtual machine in Azure DevTest Lab.

az lab vm apply-artifacts --artifacts '@artifacts.json' --lab-name MyLab --name MyVirtualMachine --resource-group MyResourceGroup