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

IIS errors when configuring DSC pull server with WMF 5

I have been trying to configure a pull server with 2012 r2 and WMF5. I used these instructions which worked fine until validating the IIS…
TyMac
  • 783
  • 2
  • 9
  • 32
0
votes
1 answer

How to use custom dsc resource with puppet?

I have a custom dsc resource that manages Data Execution Prevention using BCDEDIT. I have to manage it using puppet enterprise and I am a newbie when it comes to puppet. Can anyone tell me where do i need to place the custom dsc resource and how do…
Nitish
  • 1
  • 1
0
votes
0 answers

How to deploy an ASP.net application in IIS server in Azure Windows VM using Powershell Script?

I have created a Windows Server 2012 R2 VM using azure ARM template. I have successfully configured IIS on it. I have to deploy ASP .Net web sites to the IIS on the VM. Now I am facing problem how to deploy the application in IIS server using…
0
votes
2 answers

Can't change DSC LCM credential

When attempting to access a network shared folder, DSC returns an "Access is denied" error, despite that I have provided a valid credential to it. I'm using a DSC configuration, where a DSC "Script" resource is as follows: Script myScriptResource { …
Samer
  • 3,848
  • 4
  • 25
  • 24
0
votes
1 answer

Azure Automation Powershell DSC: Copy files off UNC Share

I'm trying to create a software distribution point to deploy internal applications to azure virtual machines with Azure Automation DSC. These msi based applications then gets copied to the local vm by the DSC File Resource and installed by the…
Chris Richner
  • 2,863
  • 2
  • 26
  • 38
0
votes
1 answer

Can't change the LCM credential of a DSC pull node

I'm trying to create my first DSC pull configuration. My node server can read its .mof files if I store them in a directory on the node server, but it can't access its configuration .mof from a configuration-repository-folder because it seems to not…
Samer
  • 3,848
  • 4
  • 25
  • 24
0
votes
1 answer

The DSC provisioner could not be found

I am trying to build a local development environment with vagrant, Packer And DSC. And I have an error saying that DSC is not found, from my understanding DSC come with Powershell 4.0 and I checked the version I have it is 5.0 (I tried to install…
rad
  • 1,857
  • 1
  • 20
  • 30
0
votes
1 answer

How do I set the SNMP community string using Powershell DSC

I am deploying vanilla windows servers to be used in an application cluster. I am using Powershell DSC to configure the nodes once they become alive. I can ensure the SNMP Feature is installed, but I cant seem to find how to set the SNMP…
BozoJoe
  • 6,117
  • 4
  • 44
  • 66
0
votes
1 answer

How to ensure exact version of Installshield setup.exe is installed by Powershell DSC

I'm trying out Powershell DSC as a way of automating deployments. We have an EXE installer created by Installshield for a server application, and need to ensure the latest version is installed. Installshield guidelines…
ben
  • 1,441
  • 2
  • 16
  • 21
0
votes
1 answer

Test Dsc custom Resources

I am new in DSC custom resources. I created 1 custom dsc resource and put into C:\Program Files\WindowsPowerShell\Modules path file created for custom resource code is below ` function Set-TargetResource { [CmdletBinding()] param ( …
0
votes
1 answer

Using TFS Release Management with a DSC pull server

I am using tfs release management which uses a custom dsc module to do some deployment tasks. At the same time I have a dsc pull server that would be able to distribute the modules to target nodes. But this does not seem to work and thus I have to…
timtos
  • 2,225
  • 2
  • 27
  • 39
0
votes
1 answer

Deploy Azure Cloud Service using Azure Automation Powershell DSC

We are using Azure Automation DSC and were able to do simple things like create Automation account, create Resource group, VM creation and even able to deploy a web site on the target VM. All using powershell scripting. How can we deploy Azure Cloud…
0
votes
1 answer

Publish-AzureRmVMDscConfiguration create archive with duplicate and nested modules

When I'm using Publish-AzureRmVMDscConfiguration to create archives for azurerm-template dsc-extensions, it has started to create archives with duplicate modules. Running Publish-AzureRmVMDscConfiguration on a configuration with these…
andrstor
  • 33
  • 5
0
votes
1 answer

How to create MOFs from Configuration File and Configuration Data File in PowerShell Desired State Configuration?

I have a configuration data file like data.psd1 @{ AllNodes = @( @{ NodeName = "*" LogPath = "C:\Logs" }, @{ NodeName = "machine1"; Roles = @( "SmtpRole", "WebRole" ) }, @{ NodeName =…
Aaron Stainback
  • 3,489
  • 2
  • 31
  • 32
0
votes
1 answer

Installing DSC resource nxComputerManagement and nxNetworking on Windows Server 2012 R2 WMF 4.0

I am trying to install the two new DSC resources for Linux nxComputerManagement and nxNetworking on Windows Server 2012 R2 machine with WMF 4.0, but when i do a Get-DSCResource or a Get-Module -Listavailable i dont see the modules listed in the…
PowerShell
  • 1,991
  • 8
  • 35
  • 57