我的Azure Automation帐户上有以下工作流脚本作为Runbook:
workflow Configure-VM
{
$DSCConfigPath = "C:\DSCConfigs\TestConfiguration"
inlinescript
{
Import-Module PSDesiredStateConfiguration
Configuration TestConfiguration
{
Node "ak-testvm-001" {
WindowsFeature IIS {
Ensure = "Present"
Name = "Web-Server"
}
}
}
Write-Output "INFO: Creating the DSC Configuration"
TestConfiguration -NodeName "ak-testvm-001" -OutputPath $Using:DSCConfigPath
Write-Output "INFO: Deploying DSC Configuration"
Start-DscConfiguration -Path $Using:DSCConfigPath -Force -Wait -Verbose
Write-Output "INFO: DSC Configuration Finished"
Write-Output "INFO: END OF RUNBOOK"
}
}当我运行此RunBook时,我得到以下错误:
Import-Module: The specified module 'PSDesiredStateConfiguration' was not loaded because it was not found in any module directory.
如何从Azure Runbook运行DSC配置?有没有可能,或者我一定要使用Windows PowerShell?
发布于 2015-06-16 02:34:00
在5月份的有限预览中,PowerShell Desired State Configuration支持被添加到Azure自动化中。您可以阅读有关如何使用Azure Automation here管理DSC节点的更多信息。
https://stackoverflow.com/questions/30844656
复制相似问题