如何在执行前验证 Powershell Desired State Configuration Template?
How to validate Powershell Desired State Configuration Template before Executing?
当我们在 Azure 中配置某些资源时,管理门户会验证生成的模板,但是当我们使用 powershell 执行此操作时,我们只会在执行时才知道问题。
There must be some parameter or switch which could help to just
validate the template & not actually execute it. Any body knows
please?
我假设您正在谈论部署 ARM 模板,并且我还假设您正在使用 AzureRm PowerShell 模块。在这种情况下,您可以使用 Test-AzureRmResourceGroupDeployment
命令来 'Validates a resource group deployment'(来自命令的帮助)。
当我们在 Azure 中配置某些资源时,管理门户会验证生成的模板,但是当我们使用 powershell 执行此操作时,我们只会在执行时才知道问题。
There must be some parameter or switch which could help to just validate the template & not actually execute it. Any body knows please?
我假设您正在谈论部署 ARM 模板,并且我还假设您正在使用 AzureRm PowerShell 模块。在这种情况下,您可以使用 Test-AzureRmResourceGroupDeployment
命令来 'Validates a resource group deployment'(来自命令的帮助)。