0

Is it possible to install and use Desired State Configuration (DSC) in Azure Cloud Shell and, if so, how?

From the Azure Cloud Shell prompt, if I run the following command:

Start-DscConfiguration

the following error is returned:

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
Jonathan Bailey
  • 306
  • 2
  • 13
  • DSC is an extension to automate processes in VM. I don't think can bee installed in cloud shell. – Llazar Oct 16 '18 at 13:16

1 Answers1

0

You can put your DCS script into Azure Automation to use from Cloud Shell.

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

Once in Azure Automation you can start if from CloudShell using:

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

Ken W - Zero Networks
  • 3,533
  • 1
  • 13
  • 18