首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Runbook中的Azure DSC配置

Runbook中的Azure DSC配置
EN

Stack Overflow用户
提问于 2015-06-15 20:00:05
回答 1查看 380关注 0票数 2

我的Azure Automation帐户上有以下工作流脚本作为Runbook:

代码语言:javascript
复制
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?

EN

回答 1

Stack Overflow用户

发布于 2015-06-16 02:34:00

在5月份的有限预览中,PowerShell Desired State Configuration支持被添加到Azure自动化中。您可以阅读有关如何使用Azure Automation here管理DSC节点的更多信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30844656

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档