如何使用VSTS DSC配置在Azure VM上自动安装软件

如何使用VSTS DSC配置在Azure VM上自动安装软件,azure,automation,installation,azure-devops,dsc,Azure,Automation,Installation,Azure Devops,Dsc,全部, 我正在尝试找出如何使用VSTS DSC配置将软件安装到Azure虚拟机上。我所需要的只是指出正确的方向,告诉我如何完成这项任务或提出建议。我很少有这样做的经验,所以任何帮助将不胜感激 感谢通过PowerShell DSC将软件安装到Azure VM,您可以参考文档D 作为示例,示例powershell脚本如下所示: # Define the script for your Desired Configuration to download and run $dscConfig = @{

全部,

我正在尝试找出如何使用VSTS DSC配置将软件安装到Azure虚拟机上。我所需要的只是指出正确的方向,告诉我如何完成这项任务或提出建议。我很少有这样做的经验,所以任何帮助将不胜感激


感谢

通过PowerShell DSC将软件安装到Azure VM,您可以参考文档D

作为示例,示例powershell脚本如下所示:

# Define the script for your Desired Configuration to download and run
$dscConfig = @{
  "wmfVersion" = "latest";
  "configuration" = @{
    "url" = "https://github.com/Azure-Samples/compute-automation-configurations/raw/master/dsc.zip";
    "script" = "configure-http.ps1";
    "function" = "WebsiteTest";
  };
}

# Get information about the scale set
$vmss = Get-AzureRmVmss `
                -ResourceGroupName "myResourceGroup" `
                -VMScaleSetName "myScaleSet"

# Add the Desired State Configuration extension to install IIS and configure basic website
$vmss = Add-AzureRmVmssExtension `
    -VirtualMachineScaleSet $vmss `
    -Publisher Microsoft.Powershell `
    -Type DSC `
    -TypeHandlerVersion 2.24 `
    -Name "DSC" `
    -Setting $dscConfig

# Update the scale set and apply the Desired State Configuration extension to the VM instances
Update-AzureRmVmss `
    -ResourceGroupName "myResourceGroup" `
    -Name "myScaleSet"  `
    -VirtualMachineScaleSet $vmss

使用trendmicro扩展n