Questions tagged [powershell-dsc]

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

42 questions
6
votes
1 answer

Using variables inside a DSC composite resource

I am fairly new to PowerShell DSC to the answer to this may be blindingly obvious but I cannot find a similar problem described anywhere. I have a PowerShell DSC composite resource which downloads some MSIs and runs them. The directory that the file…
Mark Watts
  • 724
  • 7
  • 15
2
votes
1 answer

AWS Directory Services - Access Denied

I am trying to use this module as part of automating AD in AWS. Script ... Install RSAT-AD-PowerShell & xActiveDirectory ... then Configuration DevAws { Import-DscResource –ModuleName PSDesiredStateConfiguration Import-DscResource -Module…
Matt Canty
  • 2,395
  • 5
  • 35
  • 50
2
votes
0 answers

Documentation on which sub-features are included for a given WindowsFeature

We are in the process of setting up PowerShell DSC for the dev/test/production environments for a new project. With the obvious goal that all environments end up identical. One example is using the WindowsFeature resource to install the Web-Server…
Julian
  • 20,008
  • 17
  • 77
  • 108
2
votes
1 answer

Azure DSC - copying files from Storage Account with SAS - error "Relative path is not supported"

When I try to copy website (even a single file) to VM with DSC, with the following configuration: File WebSiteContent { Ensure = "Present" SourcePath =…
Lech Migdal
  • 3,828
  • 5
  • 36
  • 63
2
votes
1 answer

How to make resource level variables

For example, let's say I have a Script resource: configuration ChocolateyServer { node localhost { Script ChocolateyPackages { SetScript = { $tools =…
sirdank
  • 3,351
  • 3
  • 25
  • 58
2
votes
1 answer

Configuring HKEY_CURRENT_USER with DSC Resource actually updates HKEY_USERS\.DEFAULT

The following DSC declaration writes to Registry key HKEY_USERS.DEFAULT\Console instead of HKEY_CURRENT_USER\Console. Why? Registry ConsoleFaceName { Key = 'HKEY_CURRENT_USER\Console' ValueName = "FaceName" ValueData = "Lucida…
ChiliYago
  • 11,341
  • 23
  • 79
  • 126
1
vote
0 answers

VSTS Agent Check if VM Already in Release Environment

I'm trying to use Powershell DSC to provision virtual machines in Azure and use Azure DevOps to manage the actually code deployment onto the virtual machines. The DSC script is setup to install IIS, asp.net core hosting, setup the sites in IIS, but…
MPavlak
  • 2,133
  • 1
  • 23
  • 38
1
vote
1 answer

Could not find the module 'cChocoInstaller' when I try to compile my DSC configuration

I'm trying to get Chocolatey installed to manage packages on a a windows VM using Powershell DSC. I've prepared my configuration file Configuration chocandfirefox { Import-DscResource -ModuleName cChoco Import-DscResource -ModuleName…
reticentKoala
  • 235
  • 2
  • 9
1
vote
1 answer

Getting Undefined DSC resource 'SqlSetup' even when the module is installed

I am trying to install SqlServer via DSC, but I keep hitting this error Exception calling "NewScriptBlock" with "1" argument(s): "At line:10 char:5 + Import-DscResource -ModuleName 'SqlServerDsc' + …
1
vote
1 answer

How to setup automatic startup configuration for a windows service using Powershell DSC

I am building a windows server image using Packer tool and Powershell DSC. In my DSC script I am installing and starting the tomcat service as below, Script Tomcat_Service_Install { TestScript = { $false } GetScript =…
1
vote
1 answer

How can I provision IIS on EC2 Windows with a resource?

I have just started working on a project that is hosted on an AWS EC2 Windows Instance with an IIS. I want to move this setup to more reliable place, and one of the first things I wanted to do was to move away from snowflake servers that are setup…
Jay Pete
  • 4,123
  • 4
  • 35
  • 51
1
vote
1 answer

Registry value Setting is not taking effect after changing it

I am using the following Powershell DSC Configuration to disable the visual effects. Configuration OSConfig { param ( [parameter()] [string] $NodeName = 'localhost' ) # It is best practice to always directly…
Harshith R
  • 418
  • 1
  • 11
  • 31
1
vote
0 answers

Visual effects set to "Adjust for best Performance" using Powershell DSC

I am trying to set the Visual effects to "adjust to best performance" to optimize the OS performance.I am using Powershell DSC configuration which referring registry resource and applying this configuration. Before creating the configuration file, i…
Harshith R
  • 418
  • 1
  • 11
  • 31
1
vote
1 answer

Unable to add windows login using DSC

After I build the Azure VM and joined to a domain, I need to add a windows user to SQL Server login. I am using DSC for this, the code is Configuration SQLConfig { param( # Parameter help description [Parameter(Mandatory…
user1716729
  • 387
  • 1
  • 6
  • 19
1
vote
1 answer

How to get an Azure DSC configuration to read an Automation Account variable whose name is a parameter?

I'm trying to automate building Windows VMs in Azure, using a template and DSC. My colleagues are familiar with templates but not with PowerShell, and I want as little interaction with DSC or running cmdlets as possible. If I can't do everything…
1
2 3