0

是否可以在 Azure Cloud Shell 中安装和使用 Desired State Configuration (DSC),如果可以,如何安装?

在 Azure Cloud Shell 提示符下,如果我运行以下命令:

Start-DscConfiguration

返回以下错误:

Start-DscConfiguration : The term 'Start-DscConfiguration' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Start-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Start-DscConfiguration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
4

1 回答 1

0

您可以将 DCS 脚本放入 Azure 自动化中,以便在 Cloud Shell 中使用。

https://docs.microsoft.com/en-us/azure/automation/automation-dsc-getting-started

进入 Azure 自动化后,您可以从 CloudShell 开始使用:

https://docs.microsoft.com/en-us/powershell/module/servicemanagement/azure/start-azureautomationrunbook?view=azuresmps-4.0.0

于 2018-10-16T14:04:39.433 回答