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

Configuring Applications Settings with Desired State Configuration

I'm trying to find the proper way to configure an application using Desired State Configuration. For example, Microsoft Deployment Agent. The installation is easy using the Package resource. When you run it for the first time it prompts you for…
Jason Capriotti
  • 1,836
  • 2
  • 17
  • 33
0
votes
1 answer

Powershell DSC what is the execution context for current configuration?

I'm trying to deploy a powershell profile through DSC. The configuration should copy a .ps1 file from a network share to a local path. Running the script fails with the following error SourcePath must be accessible for current configuration. yet…
Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103
0
votes
1 answer

Desired State Configuration Hash tables

I am running into an issue trying to use the Desired State Configuration (DSC). I am using the script resource and when I run the Start-DscConfiguration -Wait -Verbose -Path .\blah it skips the step no matter what. I have set the TestScript to False…
user1475623
-1
votes
1 answer

Integrating PowerShell DSC with ITSM/Change Management

We are in the process of implementing DSC in our organization. We are able to create and deploy configurations successfully in our non-prod test environment. Before we implement DSC in PROD environment, our management need to integrate this with…
SavindraSingh
  • 878
  • 13
  • 39
-1
votes
1 answer

Azure DSC upload a blob to Azure VM

I need to copy a file from an azure storage account to a vm via azure DSC. Below is what i tried Configuration ExampleDSC { Install-Module -Name 'xPSDesiredStateConfiguration' -force Import-DscResource -Name 'xPSDesiredStateConfiguration' Node…
-1
votes
1 answer

Issue with DSC Script

Just trying to create a script to install IIS and Management Tools and getting the error below, any idea what could be the cause of it? Configuration iis_dsc_file { # Import the module that contains the resource we are using. Import-DSCResource…
learner
  • 2,480
  • 10
  • 50
  • 94
-1
votes
1 answer

How to make Powershell DSC highly be Highly Available?

Can PowerShell DSC be highly available? What is the best practice? Can i setup two pull servers and if one goes down the other one is automatically used? Whats best practice? Thanks
james
  • 617
  • 7
  • 25
-1
votes
1 answer

Azure Automation Account : Adding Azure VM's to DSC Node via azure portal

When I am trying to Add Azure VM to DSC Nodes, it is erroring out Error: VM : Error : Error - Object reference not set to an instance of an object. The DSC Configuration compiled fine without any errors. Did anyone face this error before?…
CKS
  • 497
  • 3
  • 9
  • 16
-1
votes
2 answers

ARM Template with DSC extension: Powershell file location from local destop

I would like to send the ARM template Project with related PS scripts for DSC to a third party. They would probably deploy option in VS to do the deployment. It is possible to attach the DSC script as part of the ARM project and on deploy picks up…
kumar
  • 8,207
  • 20
  • 85
  • 176
-1
votes
1 answer

Azure RM Template. How to make SQL Server 2016 consistent with Marketplace deployment

I'm trying to create an ARM Template for SQL Server 2016. Upon inspecting SQL Server ARM templates from the official Azure Github repo (and there are only SQL Server 2014 templates) I found out that their logic is consistent with how SQL Server 2014…
Max
  • 35
  • 11
-1
votes
1 answer

Azure DSC error on initial sync generating mof

I have a custom DSC module which is class based. During the initial sync process the target machine tried to generate a MOF in C:\Windows\System32\dsc which results in an error - this causes the initial sync to report as failed, even though all the…
Richard Hauer
  • 1,298
  • 9
  • 22
-1
votes
1 answer

Get-DscConfiguration: Unable to cast object of type '...' to type '...'

I've written two of my own DSC resources. When I call Get-DscConfiguration on a computer running PowerShell 4 that uses one of these resources (PowerShell 5 is not affected, I get these errors: Get-DscConfiguration : Unable to cast object of type…
Aaron Jensen
  • 25,861
  • 15
  • 82
  • 91
-1
votes
1 answer

Windows Powershell Dynamic State Configuration -- Scheduling Tasks -- Get an "Access is denied" error running it locally

I am new to Powershell and dynamic state configuration. I am trying to get a deployment script working that will set up a number of tasks in the Windows task scheduler. I have written the script and have been trying to run it on my local…
YardGlassOfCode
  • 316
  • 1
  • 2
  • 8
-1
votes
1 answer

Error Setting UP DSC Pull Server

I'm trying to setup Powershell DSC Pull Server. I copied xPSDesiredStateConfiguration DSC module to C:\Windows\System32\WindowsPowerShell\v1.0\Modules When I try to run the dsc script below: configuration CreatePullServe1r { param ( …
Vinay R S
  • 33
  • 1
  • 4
-2
votes
1 answer

Is there a place in Azure ARM Template Schema to configure DSC Automation?

I would like to be able to configure Azure Automation DSC to set itself up automatically (find the DSC configuration to apply, onboard the correct vm's as nodes). Now, I could do this use simply using Azure PowerShell commands, but I'd like for it…
AllTradesJack
  • 2,762
  • 5
  • 25
  • 36
1 2 3
33
34