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

Dynamically pass parameters to DSC resource?

I was working on a composite resource when I came across the issue of being able to dynamically pass parameters to a DSC resource and wondered if there's another way to tackle this that I'm missing. Basically, I have the an array (Below) that…
absolutejam
  • 25
  • 1
  • 10
0
votes
1 answer

DSC V5 - Keeps attempting to reapply a failed configuraiton

We have started using DSC to deploy some applications. We are pushing out the configurations and only want it to run this configuration once and then stop. However it seems that if a configuration fails we end up with a pending configuration which…
Alexis Coles
  • 1,227
  • 14
  • 19
0
votes
0 answers

Desired State Configuration for Web-Asp-Net452

I am trying to set up a WindowsFeature for .NET Framework 4.5.2 in DSC file but this version doesn't exist in the machine by default. How to install it on the machine remotely by defining configuration in the script? For ASP.Net 4.5 I…
arth81
  • 229
  • 5
  • 17
0
votes
1 answer

Could not install module dependencies needed by the configuration (DSC)

I am trying out the new Desired state configuration stuff and trying to work with a new class resource. I have installed the pre-production preview of WMF 5.0 on all servers involved in the process. I have a Http pull server setup where I have…
Alexis Coles
  • 1,227
  • 14
  • 19
0
votes
1 answer

System Reboot while installing applications using DSC scripts

I have two MSI's that behave differently when installed using DSC scripts. Both are VC++ applications. One of the application, after the installation is complete, requests for a reboot, while the other does not. I have cross verified both vdproj…
0
votes
1 answer

DSC with xActiveDirectory: Verification of prerequisites for Domain Controller promotion failed

I'm starting to become a big fan of "Desired State Configuration" (DSC). Great work so far, guys! Im using the "xActiveDirectory" script (https://gallery.technet.microsoft.com/scriptcenter/xActiveDirectory-f2d573f3) published a few weeks ago. As…
Christopher Wilke
  • 65
  • 1
  • 1
  • 10
0
votes
0 answers

Why doesn't the DSC File Resource work for workgroup shares

I am currently using a File resource with a credential which has been obtained through Get-Credential. I have a number of machines which are not on a domain but all on the same subnet. One of these machines has a share created on it, the file…
John
  • 1,566
  • 6
  • 17
  • 28
0
votes
1 answer

Two package resource is not installing continuously in Powershell DSC

I am using Package Resource to install the MSIs and EXEs in PowerShell DSC. I am using pull modal. I am triggering the Consistency Job to check the configurations is applied or not for testing.(Unable to wait 30 mins for single testing :) ) Here is…
Vinoth
  • 1,975
  • 21
  • 34
0
votes
1 answer

DSC Resource Global Variable

I'm trying to pass some information from Test-TargetResource to Set-TargetResource using Global Variable but it doesn't work when I run my configuration . Can you use Global Variables in DSC Resources ?
0
votes
1 answer

PowerShell DSC: Error 22 using certs to encrypt creds in a Service Resource

I'm trying to use certificates to embed credentials into a Service resource. I've got PKI in the infrastructure and all my test servers are auto-enrolled. I exported their certs locally to work with and have them in my ConfigData as follows: @{ …
0
votes
2 answers

Powershell DSC 1.7 version parameter issue

I am writing the PowerShell scripts to create network in Azure. I just checked the dsc version got updated from 1.5 to 1.6 and 1.7 in last two days. Due to which I am getting error within my scripts. The dsc gets applied properly but in the…
0
votes
1 answer

How do I disable automatic updates for Azure VM extensions?

We have a few VMs in Azure and we rely on the PowerShell DSC extension to deploy our code to the machines. I want to make sure that this extension is not updated automatically so that our code that uses functionality from this extension don't break…
julealgon
  • 7,072
  • 3
  • 32
  • 77
0
votes
1 answer

DSC Windows Management Framework 5 Pull Server

I've been trying to setup a DSC Pull Server on a Windows Server 2012 R2 (both server and client), I've juste installed the CTP version of WMF 5. I've configured my client LCM to listen to the Server URL for a specific configuration, when trying to…
user998824
  • 77
  • 1
  • 3
  • 13
0
votes
1 answer

How to provision multiple Azure VMs with DSC

I’m trying to provision multiple Azure VMs using DSC (Desire state configuration). Unfortunately all examples and documentation out there show only simple “one machine” provisioning. I have experimented and research it but still cannot make it…
DevUser
  • 751
  • 2
  • 8
  • 26
0
votes
2 answers

PowerShell DSC - not installing nested components for Web-Server

I have written PowerShell DSC Configuration. It works but not as expected. I am trying to install Web-Server and other features underneath it. When i am running the script, it only installs Web Server (IIS) and nothing else. This is how my…
Asdfg
  • 11,362
  • 24
  • 98
  • 175