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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

How do I create accounts in AD Users container using DSC?

I've got a section in my DSC-configuration that creates new accounts in a specified OU. (Input parameters are omitted in the example below.) Please ignore that I'm currently handling passwords with -...
Dennis's user avatar
  • 926
0 votes
0 answers
24 views

Schedule Task created using DSC, not able assign USERS group for running the task

TaskName = 'EXCEL-Auto' TaskPath = '\CustomTasks' ActionExecutable = 'C:\Program Files\Microsoft Office\root\VFS\...
Azure_CloudServices's user avatar
0 votes
0 answers
94 views

DSC Certificate Update - Method C_GenerateKeyPair returned CKR_General_error with Error Code [5]

I am trying to Update My DSC is Expiring Soon But geting Error now Following the Same steps given in Video but Getting Error After Login https://www.youtube.com/watch?v=CQGz2RzwX-U trying to update ...
Divyanshu Maurya's user avatar
1 vote
1 answer
57 views

Azure DSC extention. How to use additional items in a archive

I'm trying to use DSC extension for Azure VM. I have created zip archive with main PS file, and included additional archive to the main archive, with couple additional files After DSC extension is ...
Roman R.'s user avatar
0 votes
1 answer
32 views

Read file content and output result by Desired State Configuration

I use DSC, and try to read txt file and get it output to the console, and frankly - futile. I have tried to use Script resource, but neither GetScript no SetScript helped to me. Maybe do you guys know ...
Roman R.'s user avatar
0 votes
1 answer
38 views

While deploying the DSC configuration getting error: "The PowerShell DSC resource X from module Y does not exist at the PowerShell module"

While deploying the DSC configuration I am getting below error: InvalidOperation: The PowerShell DSC resource MSFT_AADGroupsNamingPolicy from module <Microsoft365DSC,1.23.726.1> does not exist ...
Kadir Ansari's user avatar
0 votes
0 answers
15 views

Not able to create DSC Composite Resource

I am trying create a composite resource on Windows Server 2022. Now, I am following the example given in http://4syops.com/archives/how-to-create-a-composite-powershell-dsc-resource/ I am not sure ...
Andy5's user avatar
  • 2,325
0 votes
0 answers
16 views

DSC runs but it doesn't appear to have completed the configuration

I have created a DSC configuration file, a very basic setup to create a folder and a text file with the word HELLO. The configuration is only run on my machine. The steps followed was to start the ...
Andy5's user avatar
  • 2,325
0 votes
0 answers
98 views

How do I resolve scheduled task created using DSC can't be started manually?

I've tried setting up a scheduled task using DSC (Desired State Configuration) that starts at "creation time" and restarts if it's stopped within 5 minutes using the configuration below... 1....
Dennis's user avatar
  • 926
0 votes
0 answers
11 views

DSC error: powershell async result could not be found in 20 seconds

I'm using DSC to deploy software to multiple computers. On some of the computers an error occured: powershell async result could not be found in 20 seconds. Does anybody have any idea what could be ...
markogloga's user avatar
0 votes
1 answer
112 views

Applying HSTS settings using WebAdministrationDsc/WebConfigPropertyCollection?

I'm using Windows Server 2019, Posh5.1, WebAdministrationDsc 4.1.0, and WebConfigPropertyCollection. I see I have to use 2 passes for the resource to do this way for multiple properties, so I ...
Nicholas McQuillen's user avatar
0 votes
0 answers
38 views

Azure AutomationAccount DSC scripts debug

I am running a DSC script from an Azure automation account to configure Windows VMs. It downloads files from a storage account in Azure to hosts for more configurations. If I hardcode the storage ...
user3739312's user avatar
0 votes
0 answers
213 views

Passing secure parameter to PowerShell DSC script from Bicep template

I am using a Bicep template to deploy a virtual machine with a PowerShell DSC script that adds a Log Analytics workspace to the Log Analytics agent. The script uses a secure parameter (workspaceKey1) ...
Adrian's user avatar
  • 25
1 vote
1 answer
120 views

How do I update an array in an array in a hashtable in Powershell?

I'm using Powershell desired state configuration and have a separate definition document (psd1) I load into memory via $ConfigData = Import-PowerShellDataFile "$Path" where I'd like to ...
Nicholas McQuillen's user avatar
1 vote
0 answers
49 views

Why is the installationpolicy of the PSGallery does not change even when Puppet states it changed?

I am generally new to Puppet, so would need a bit of a help with the following problem: I am trying to use this module: https://forge.puppet.com/modules/dsc/powershellget Added this to the manifest: ...
krapulax's user avatar
  • 115
0 votes
1 answer
87 views

PowerShell Desired State Configuration - Conditionally Create resources

What I am trying to do is the following. Our server host 4 different web applications through an IIS Website ( maybe more in the future ) . Depending on the customer they may have 1 or more of those ...
mpac99's user avatar
  • 1
0 votes
0 answers
404 views

PowerShell DSC resource MSFT_PackageResource failed: The return code 1618 was not expected. Configuration is likely not correct

I have exe file downloaded in the VM in specific folder, I am trying to install Adobe using Powershell dsc code. Script is failing with below error during execution (Configuration is called through ...
Hariprasath's user avatar
1 vote
1 answer
153 views

Merge multiple configuration files using powershell

My Powershell script receives multiple Microsoft Office365 DSC policy configuration policy files as input in a folder as below: file1.ps1 Configuration EXOSharingPolicy { param ( [...
autobot's user avatar
  • 131
0 votes
1 answer
118 views

DSC to create multiple apppools

I am trying to create multiple app pools using DSC. If I try to make the $AppPoolName accept an array I get the error: Exception calling "ValidateInstanceText" with "1" argument(s):...
Adrimus's user avatar
  • 13
0 votes
3 answers
475 views

DSC Configuration 'AD' completed with error(s). Following are the first few: WinRM cannot process the request

I am getting below error while triggering a dsc configuration in a AD VM. VMExtensionProvisioningError","message":"VM has reported a failure when processing extension '...
Hariprasath's user avatar
0 votes
1 answer
95 views

Desired State Configuration File Resource Fails

I am trying to use desired state configuration to check whether or not a file exists in a specific location on the virtual machine that the configuration is applied to. The code compiles but when I ...
Malkie's user avatar
  • 1
2 votes
3 answers
659 views

The password supplied to the Desired State Configuration resource is not valid. The password cannot be null or empty

I have been dealing with this error for the past day, where any Powershell DSC resource that uses a PowerShell credential object fails with the following error: The password supplied to the Desired ...
Juan M. Elosegui's user avatar
0 votes
1 answer
100 views

Azure AVD post configuration automation

I work for a little to medium size client with an azure eco system and try to find a good way to make configuration to AVD after there creation. I know there are tools like ansible but for the little ...
Mamquam's user avatar
  • 37
0 votes
1 answer
79 views

PowerShell DSC Exclude property from drift test

I'm using the xWebAdministration module to create IIS sites and application pools. When creating the site, a physical path needs to be specified. This path is changed with each deployment of the site ...
Confounder's user avatar
0 votes
1 answer
154 views

Expand variable in PowerShell DSC File resource content property

I have $Node.NodeName, $Node.Environment, $Node.Role defined in the following DSC config file. They don't appear to expand to the correct values in the MOF file and instead shows: HOSTNAME: System....
Confounder's user avatar
0 votes
0 answers
66 views

Powershell DSC - MSFT_RoleResource

I have a problem related to MSFT_RoleResource, I have recovered a DSC script that you can find below: The compilation in .mof works as shown below: Once the compilation is finished I want to make an ...
Nicolas Snow's user avatar
0 votes
1 answer
367 views

AzureRM Automation DSC Configuration

I'm trying to configure Azure DSC Configuration, but I am running into two issues. I continue to get this error message Error = 'invalid character 'c' looking for beginning of value' JSON = '...
user18582981's user avatar
1 vote
0 answers
53 views

Why won't my DSC configuration let me pass a [ref], and what's an alternative?

I'm trying to pass a variable to my DSC configuration, and have it modified inside it, then returned. To do so, I wanted to use a ref var. Like so in my powershell script: configuration My_DSC_config {...
jimothy.tutle's user avatar
0 votes
1 answer
143 views

Dynamically adding SQL Logins to DSC for Azure Automation Credentials

I have a SQL Server on a VM being setup using a DSC file. I have been able to use SQL Login in the past (https://github.com/dsccommunity/SqlServerDsc/wiki/SqlLogin) but that only allows me to use it ...
lottol's user avatar
  • 1
0 votes
1 answer
102 views

DSC Extension for linux. Error in the dsc.py

Could u please help? During the DSC Installation for Linux I'm receiving the following issues: OS: Linux (ubuntu 20.04) I'm using the following script for extension provisioning: $vmname = 'ds' $...
Boris Zaikin's user avatar
1 vote
0 answers
110 views

How do I use a required module in a custom DSC Resource when using PsDscRunAsCredential

I have created a custom PowerShell DSC resource that relies on a separate module being present on the node. I have the module on all nodes for all users (C:\Program Files\WindowsPowerShell\Modules). ...
dgmyrs's user avatar
  • 11
1 vote
1 answer
255 views

Is there a way to reference a parameter value within the same PSD1 file?

Let's say that I have a PSD1 file, with the following code: @{ AllNodes = @( @{ NodeName = $env:COMPUTERNAME Tags = @{ Environment = "dev" ...
naa2785's user avatar
  • 25
0 votes
1 answer
1k views

PowerShell DSC, Server 2019, .NET 3.5 failing to install from source

I am trying to use DSC to install .NET 3.5 from source, as my server is not able to reach out directly to MSFT. But it is failing with error code 0x800f0954. Here is the code: WindowsFeature NET_3_5 { ...
naa2785's user avatar
  • 25
0 votes
1 answer
77 views

xSCOM 1.3.3.0 throws an Exception when running DSC on Azure VM

All, I am trying to automate infrastructure where I am using Azure DevOps CI / CD Pipeline for deploying VM and using DSC to configure / install SCOM using Module XSCOM 1.3.3.0. As per my colleague, ...
Manan Shah's user avatar
0 votes
2 answers
191 views

Delete directory content using Azure Automation DSC

I am using Azure Automation DSC to deploy some basic configurations on my Azure VMs. However, I am struggling to delete recursively all the content of C:/Temp directory and leave the directory as an ...
milan.j.stevanovic's user avatar
1 vote
1 answer
332 views

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 ...
reticentKoala's user avatar
0 votes
2 answers
292 views

DSC add user in local group

In DSC configuration i shoud add local user in group, but before that how i can check if user exists or not, and only after that add in group User User { Ensure = "Present" # ...
Vadim's user avatar
  • 11
0 votes
1 answer
273 views

Running DSC in against azure windows vm using terraform

I simply want to run a configuration file or a powershell script against a windows vm using terraform. I dont have a windows box. I dont want to use an automation account or use azure blob storage or ...
Kisaragi's user avatar
  • 2,198
1 vote
1 answer
734 views

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 -...
Janice Chew's user avatar
0 votes
0 answers
417 views

PowerShell DSC res does not exist

I have created a ps1 file with the DSC configuration and one for the LCM. The MOF files were created successfully. When I start the configuration, I get the following error: The PowerShell DSC ...
Chris's user avatar
  • 143
1 vote
2 answers
589 views

How to make a DSC USB Token with Pkcs12 certificate?

Each user of our system uses an X509 certificate to sign documents or approve documents. We issue certificates by ourselves and send them to users in form of a PKCS12 file. It works perfectly so far. ...
Eric Ngo's user avatar
  • 146
0 votes
0 answers
123 views

Use executing user credentials in powershell

I'm trying to create an Azure DevOps pipeline to build and deploy DSC PowerShell scripts and configuration files. One Configuration needs credentials as a parameter. How can I pass the credential of a ...
KrisKul's user avatar
  • 13
1 vote
1 answer
426 views

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 { ...
Rushikesh Gaidhani's user avatar
0 votes
1 answer
207 views

Is there a way to force the Invoke-DscResource cmdlet?

I am trying to use the Invoke-DscResource cmdlet in a series of tests (using Pester) to see if a configuration has been successfully applied to a VM. This works 9/10 times, but sometimes the following ...
espressocode's user avatar
1 vote
2 answers
3k views

when I print for debug it shows type-->Instance of 'Future<dynamic>' in Flutter

simply my task is to give a shared data to the variable "type" , please help me out *this sample code is main.dart and i used shared preferences for data transfer and the key for type is &...
krish cyber's user avatar
2 votes
0 answers
358 views

DSC cannot create SSL/TLS secure channel in the SendConfigurationApply function

I am trying to add a vm scale set to an agent pool in Azure Devops. I have set up the VMSS and now am adding DSC as an extension which will then call "SendConfigurationApply" to send to the ...
HellyBelly's user avatar
2 votes
1 answer
341 views

How to make the proxy settings of a windows VM by using desired state configuration (DSC) in Azure?

I am checking how to make the proxy settings of a windows VM by using desired state configuration (DSC) in Azure. Is there a library of DSC? Normally, i am using below commands to set the proxy from ...
MoonHorse's user avatar
  • 1,996
0 votes
1 answer
301 views

DSC Node is not restarting

For my learning testlab I have a simple DSC configuration. I am creating VMs and have them running the following ps1 on first startup to rename the system to the VM's name. configuration ...
m0ebius's user avatar
0 votes
1 answer
1k views

Creating azure automation dsc configuration and dsc configuration node using terraform doesn't seems to be working

As a very first step of my release process I run the following terraform code resource "azurerm_automation_account" "automation_account" { for_each = data....
Alexey Auslender's user avatar
0 votes
1 answer
112 views

Azure Automation State Configuration: Where to see if apply and autocorrect was successful on OS side?

Currently testing a DSC that ensures DHCP is always enabled on Azure VMs. Running in apply and monitor works fine and will warn when a machine is not complaint and the VM will still remain up, ...
EG92's user avatar
  • 85

1
2 3 4 5
11