Questions tagged [dsc]

Desired State Configuration (DSC) is a feature in Windows Powershell that enables deployment and management of configuration data for software services and management of the environment in which these services run.

Description

DSC is a management platform in Windows PowerShell that enables deploying and managing configuration data for software services and managing the environment in which these services run.

DSC provides a set of Windows PowerShell language extensions, new Windows PowerShell cmdlets, and resources that you can use to declaratively specify how you want your software environment to be configured. It also provides a means to maintain and manage existing configurations.

Practical Applications

Following are some example scenarios where you can use built-in DSC resources to configure and manage a set of computers (also known as target nodes) in an automated way: Enabling or disabling server roles and features

  • Enabling or disabling server roles and features

  • Managing registry settings

  • Managing files and directories

  • Starting, stopping, and managing processes and services

  • Managing groups and user accounts

  • Deploying new software

  • Managing environment variables

  • Running Windows PowerShell scripts

  • Fixing a configuration that has drifted away from the desired state

  • Discovering the actual configuration state on a given node

In addition, you can create custom resources to configure the state of any application or system setting.

* Source: http://technet.microsoft.com/en-us/library/dn249912.aspx

Azure DSC

DSC has become a core configuration technology in Azure, Microsoft's cloud platform. A DSC can be associated with an Azure VM when it is created by setting a DSC configuration provision parameter. This ensures once the VM comes to a ready state, the vm is in the configuration required by the application.

There are three mechanisms by which Azure invokes DSC:

  • On VM creation if a DSC extension is set with Set-AzureVMDSCExtension cmdlet

  • On VM reboot: DSC is re-run during every VM reboot to assure the VM is in the "Desired State"

  • On VM update: if Set-AzureVMDSCExtension is executed on an existing VM, it will execute DSC.

Source: https://msdn.microsoft.com/en-us/library/azure/dn877980.aspx?f=255&MSPPError=-2147217396

AWS (Amazon Web Services) DSC

DSC has been extended to AWS, Amazon's cloud platform. A DSC can can be executed when an AWS VM is created with CloudFormation. This ensures once the VM comes to a ready state, the vm is in the configuration required by the application.

Source: https://s3.amazonaws.com/quickstart-reference/microsoft/powershelldsc/latest/doc/Windows_PowerShell_DSC_on_AWS.pdf

AWS DSC Toolkit

This module allows you to register AWS EC2 instances as DSC Nodes in Azure Automation. You can then control your EC2 instances in Azure Automation using PowerShell DSC configurations.

Source: https://github.com/PowerShell/AwsDscToolkit

Source: https://blogs.msdn.microsoft.com/powershell/2016/04/20/aws-dsc-toolkit/

510 questions
0
votes
1 answer

Is it possible to lazily evaluate features in Windows PowerShell Desired State Configuration?

In Windows PowerShell Desired State Configuration, you can define features: Node $MachineName { # define the IIS Role WindowsFeature IIS { Name = “Web-Server” } # define the SQL Role WindowsFeature SQL { …
oɔɯǝɹ
  • 7,219
  • 7
  • 58
  • 69
0
votes
1 answer

SharePoint search service setup with desired state configuration error

I'm configuring a SharePoint 2013 deployment using Desired State Configuration (DSC). I have configured several services to be provisioned using DSC, but I am having trouble getting search config to work. The following command fails in the context…
0
votes
2 answers

Is There a Specification for MOF Comment Delimiters

This MOF Format Specification is riddled with C-style ("//") comments but the the allowed structure of actual MOF file comments are not shown in the BNF (which uses BNF improperly, IMO: "aliasIdentifer = "$" IDENTIFIER // NO whitespace !"). I have…
Daniel Randall
  • 351
  • 2
  • 13
0
votes
2 answers

PowerShell: Change to module shows no effect - some kind of recompile needed?

I am currently in the process of setting up a DSC pull server using the DSC resource kit wave 8. Unfortunatelly the module MSFT_xDSCWebService.psm1 has a bug and throws an exception when ever another locale then 'en' is in use. The exception…
Matthias Güntert
  • 4,013
  • 6
  • 41
  • 89
0
votes
2 answers

How to get some file from smb share in DSC script?

I am trying to copy one file from share in my custom dsc script. This code below works great in powershell, but not working in dsc resource. PS C:\Users\user> $wc = New-Object System.Net.WebClient PS C:\Users\user>…
Vadim Seo
  • 41
  • 1
  • 3
0
votes
1 answer

Set-AzureVMDscExtension with large package leads to extreme memory usage in PowerShell DSC Extension

I finally managed to automate our release process using Desired State Configuration with the Azure PowerShell SDK methods, in particular the Publish-AzureVMDscConfiguration -> Set-AzureVMDscExtension -> Update-AzureVM combo. After thinking for a…
julealgon
  • 7,072
  • 3
  • 32
  • 77
0
votes
1 answer

Are custom component configuration variables not supported in the new release templates?

Release Management always had the concept of "components", which are units of deployment that can be independently configured in the pipeline. Each component could have a number of stage-specific configuration variables, that could be configured in…
julealgon
  • 7,072
  • 3
  • 32
  • 77
0
votes
1 answer

How do I handle target machine independent actions in Release Management?

We currently use the Visual Studio Release Management tool to manage the release phase of our code. At the moment, we are using the action based, old templates, that require a dedicated deployment agent installed on each target machine. In the…
julealgon
  • 7,072
  • 3
  • 32
  • 77
0
votes
2 answers

Run "Invoke-Expression" statement as another user

I have a PowerShell script/function, that takes few arguments and runs it. Invoke-Expression ".\ScriptFile.ps1 $($Node.Name).xml C:\TempFolder\ $($Node.Name) local" Now I want to run that as another user. Invoke-Expression doesn't have an inherent…
Learner
  • 1,685
  • 6
  • 30
  • 42
0
votes
1 answer

PowerShell DSC Pull Server returns HTTP 503 Service Unavailable

I'm using the PowerShell 5.0 September Preview to configure a PowerShell Desired State Configuration Pull Server on a Windows Server 2012 R2 virtual machine running on VMware Workstation. To perform the configuration of the DSC Pull Server, I am…
user189198
0
votes
1 answer

Installing AppFabric 1.1 with PowerShell DSC results in modal dialog error

I'm trying to automate the installation of AppFabric 1.1 on a Windows 2012 R2 server using PowerShell DSC. This is actually part of me trying to automate the SharePoint Foundation install and configuration, but AppFabric 1.1 is a pre-requisite. …
AnthonyBCodes
  • 342
  • 2
  • 13
0
votes
1 answer

Using PowerShell DSC in Pull mode how do you tell it's finished?

Using PowerShell DSC in Pull mode how do you tell that the set of computers have finished deploying? - For example if the ConfigurationMode=ApplyOnly or ApplyAndMonitor, our operations guys would like to know when it's 'done'. (We're planning on…
Squirrel
  • 1,189
  • 12
  • 15
0
votes
1 answer

DSC Module does not implement the write property faceTime

I am not understanding the concept on how to create a Desired State Configuration Resource. I keep getting errors. I use the following. Can someone give me a very simple way to understand this? Mof [ClassVersion("1.0.0"), FriendlyName("SQLInstall")]…
user1475623
0
votes
1 answer

DSC can't load WebAdministration module

I'm a beginner to Desired State Configuration, but I've been having some trouble doing something kind of basic. My configuration is essentially install IIS (including Web Management and some other parts), run some installers then stop the default…
Hugo
  • 710
  • 1
  • 10
  • 19
0
votes
1 answer

PowerShell : error handling when using -asjob parameter

I can't figure out how to get the computernames that did not respond when using -asjob, could someone advise? try{ gwmi "Win32_OperatingSystem" -ComputerName $ordis -asjob $resu=get-job | ? {$_.psjobtypename -eq "wmijob" } |wait-job…
Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103
1 2 3
33
34