全部,
我正在尝试弄清楚如何使用 VSTS DSC 配置将专门的 TrendMicro 软件安装到 Azure VM 上。我所需要的只是指出如何实现这一目标或建议的正确方向。我在这方面的经验很少,因此我们将不胜感激任何帮助。
谢谢
最佳答案
通过PowerShell DSC将软件安装到Azure VM,可以引用文档D eploy your application on virtual machine scale sets .
例如Install an app to a Windows VM with PowerShell DSC ,示例 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
关于azure - 如何使用 VSTS DSC 配置自动将软件安装到 Azure VM 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51290434/