У меня есть следующий Workflow скрипт как Runbook на моем счете Azure автоматизации:Конфигурация Azure DSC от нетривиальной
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.
Как я могу запустить DSC-конфигурацию из Azure Runbooks? Возможно ли это, или мне абсолютно необходимо использовать Windows PowerShell?