Questions tagged [dsc]

Windows PowerShell Desired State Configuration is a tool akin Chef or Puppet, meant to automate keeping Windows servers in a known state.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

Understanding class-based DSC resources (AppLocker)

I'm trying to convert some MOF-based DSC resources into class-based ones. The class concept in PowerShell is thankfully pretty similar to other languages like Java, but I'm having trouble ...
0
votes
0answers
18 views

Can the windows DSC make it less soul crushingly horrid to config IIS logging?

This is what I have had to do to setup IIS logging. I ripped this from a larger set of scripts so formating/syntax might not be 100% but this works and is sort of idempotent in that it can be run a ...
1
vote
0answers
39 views

Is it possible to write a PowerShell DSC configuration that waits for a manual installation?

I would like to use DSC to check and correct Service resources as State = Running. The issue is that these services don't exist until I have manually run a software installer on the target node. I am ...
1
vote
1answer
75 views

Manage Group Policy across multiple domains

I am looking for a way to manage Group Policy across a number of domains, some in the same forest and others in separate forests. I haven't seen this done before and can't find anything around the ...
0
votes
0answers
10 views

how do i schedule DSC changes?

im using DSC via an azure automation account. I havent set any of the LCM stuff, but i just wanted to know what the best practice is, regarding changes and scheduling them? for instance, if i want to ...
0
votes
0answers
33 views

DSC TestScript - check service running, multiple lines in if statement

Putting together a bit of powershell DSC to install Elastic search. Struggling with the testscript config to check whether the service is already installed. Got the following bit of powershell and ...
0
votes
0answers
32 views

How to install SSMS using Azure Automation DSC?

configuration InstallSSMS { #Import the required DSC Resources Import-DscResource –ModuleName 'PSDesiredStateConfiguration' Node InstallSSMS { Package SSMS { Ensure = "...
0
votes
1answer
43 views

SSL Certificate management with Windows DSC

I have a third-party issued certificate that I need to ensure is running on all targets in a given domain. Is there a way to ensure this certificate is installed by way of DSC?
0
votes
1answer
27 views

Resize-Partition errors after first execution in DSC script

I'm trying to use the following piece of code in a powershell DSC script. It runs fine on first execution but on following executions it throws an error as it's already expanded. Here's the command: ...
0
votes
1answer
53 views

DSC SMB Pullserver - clients are unable to locate mof file

I have configured the LCM of my target node like this: [DSCLocalConfigurationManager()] configuration SMBPullClientConfig { param ( [PARAMETER(Mandatory=$false)] $NodeName = 'localhost', ...
0
votes
1answer
268 views

Installing Module during OSD Task Sequence from NuGet not found

I have an OSD task sequence which one of the steps runs a package containing the PowerShell DSC '.ps1' file and the '.MOF' configuration. Now during the task sequence it looks like it can't find the ...
1
vote
1answer
48 views

DSC not pulling config

my DSC node is not pulling the DSC config from my SMB DSC server. Get-DSCConfigurationStatus says the pull was successfull but Get-DSCConfiguration remains the same(old config). Im testing it with a ...
1
vote
0answers
37 views

DSC switching back to push

Hi there i got a small problem. I have configured a node to pull the config from my HTTP DSC server. But once it pulls its config the node switched back to push. My node config looks like this: [...
1
vote
1answer
368 views

Powershell DSC composite resource, partial configuration, or roles. What's the best approach that's maintainable?

I'm having a little bit of a hard to trying to decipher what the best approach is when creating configurations based off Powershell DSC. It appears that partial configurations are meant to allow ...
2
votes
1answer
209 views

DSC Resource for SSL and TLS and Ciphers

I need to ensure that servers have been properly configured to prevent the usage of SSL2/3 and TLS1.0/1.1 and ensure that only TLS1.2 is enabled. In addition I need to ensure that certain ciphers are ...
1
vote
1answer
59 views

Only include a CertReq in a PowerShell DSC if needed

I'm currently using the CertificateDSC CertReq resource to generate a certificate request within a DSC configuration. I'm pretty new to DSC, I'm checking it out using a push approach and my workflow ...
1
vote
1answer
98 views

How to assign a static IP to linux host using Powershell DSC / Lability?

Setup: I am using Lability to deploy a hacking lab consisting of 3 virtual machines. One of the machines is Kali Linux. How could I automatically set a static IP for the Kali when it is first deployed ...
1
vote
1answer
101 views

Puppet unable to add user to AD group

I'm trying to add user to group on my DC using puppet: dsc_xgroup {'DomainAdministrators': dsc_ensure => 'present', dsc_memberstoinclude => 'tfl@ad.contoso.com',...
1
vote
1answer
845 views

How to Use PowerShell DSC to Keep Services on Windows Server Running?

I've recently noticed that our Windows Server 2016 VMs on Azure sometimes fail to start some of their services after rebooting the system (for example ADFS, Remote Desktop Broker and others) even ...
0
votes
0answers
119 views

Applying PowerShell Desired State Configuration to Windows host from Linux control machine

I'm interested in using my Linux work machine to apply DSC configuration to Windows machines. I can find lots about using DSC to manage Linux, but that isn't what I'm interested in, I want to use it ...
0
votes
1answer
15 views

What Installtion is needed before desired state configuration can be used?

I want to know what is installed on a bare mental machine (real or virtual) to allow it to be further configured by DSC. All the demos I have seen already have "something" installed on the target so ...
4
votes
1answer
2k views

Can DSC be used to configure IIS on a Windows 10 workstation

I couldn't find this on the interwebs and it seems like a obvious use case to me Is it possible run Windows Desired State Configuration / DSC on a Windows 10 workstation? For example, setting up IIS ...
1
vote
0answers
146 views

PowerShell JEA RoleDefinitions Trusted Domain

This one may be a bit tricky, and may not be possible. I have a PowerShell JEA endpoint configured in my DSC. It runs fine. The trouble is the users that are listed in the RoleDefinitions section of ...
1
vote
0answers
295 views

Manual PowerShell DSC module installation

I am working on servers without access to the Internet. I am uploading DSC modules to the server, E.g. AccessControlDSC. The modules are being installed in c:\Program Files\WindowsPowerShell\Modules ...
1
vote
1answer
232 views

Is it possible to manage Server Manager Properties through PowerShell DSC?

For example: Server Manager → Manage → Server Manager Properties "Do not Start manager automatically at logon" Server Manager → Local Server → IE Enhanced Security Configuration → Off
3
votes
1answer
1k views

Is it possible to download a file using a Powershell DSC resource from Azure File storage account?

I have a file in an Azure File storage. I would like to download it using a DSC resource (xRemoteFile, for example). The Azure File storage gives me an HTTPS url to that file, but it is not directly ...
0
votes
1answer
215 views

Is it possible to ensure a certain schedule for the windows updates on a Windows Server 2016 using Powershell DSC?

Part of configuration is to run all the Windows Updates. I am trying to figure out how to express it with Powershell DSC. Seems like the best is to ensure that the windows updates are scheduled ...
0
votes
1answer
128 views

Is Azure Automation DSC at all suitable for configuring client machines (not servers)?

I am trying to create a DSC configuration for a developer workstation and facing difficulties. A developer machine has a well defined owner - the developer who is going to get it. Some ...
0
votes
1answer
365 views

How to install SSMS on a client workstation using Azure Automation DSC?

I found the following post - https://blogs.msdn.microsoft.com/troy_aults_blog/2017/01/13/automating-installation-of-ssms-with-dsc/ Great, all I need to know now is the Product Id of SSMS-Setup-ENU....
1
vote
1answer
2k views

How to use DSC to install .NET windows feature on a non server machine?

Observe the following DSC configuration: Configuration Example { Import-DscResource –ModuleName PSDesiredStateConfiguration node localhost { WindowsFeature 'NetFramework45' ...
2
votes
1answer
70 views

When using Azure Automation DSC is it possible to install a product on a non SSD drive if the latter exists?

Suppose I have a product which I want to install on a non SSD drive, if exists. Otherwise, I want it to go on the drive C. For example, the following configuration is supposed to install the Sql ...
1
vote
1answer
92 views

How to automatically deploy a new resource from Azure Automation to DSC nodes?

Scenario: I have a Windows 10 workstation on-boarded to Azure Automation (AA). It is configured to pull configuration from AA correctly - checked. I wish to install Sql Server 2016 Developer edition ...
0
votes
1answer
83 views

Is it possible to keep all the DSC configurations in Version Control and make Azure Automation fetch it from there automatically?

The Azure Automation DSC seems to know to integrate with GitHub, but it seems to expect only runbooks there. At least, this is what I understand from the following UI screen: I have just started to ...
0
votes
1answer
255 views

Passing arguments to Set-AzureRmVmDscExtension

I'm trying to pick up a passed-in argument to a PowerShell DSC configuration fired by Set-AzureRmVMDscExtension and not having much luck. The idea is to have a xRemoteFile section download a file at a ...
1
vote
0answers
484 views

Configuring NICs on Windows safely in DSC or Puppet

We've been using DSC basically since its day 1 release, but one thing we've never been able to do successfully (either by direct plain DSC or via invoking DSC via puppet) is configure Windows ...
1
vote
1answer
385 views

How do ARM projects in Visual Studio upload their DSC (and other) assets?

I've worked with ARM templates a bit but building ARM projects in Visual Studio is new. When you create VM resources and then subsequently create a script or DSC extension, in addition to the new JSON,...
4
votes
2answers
861 views

Failure joining on-prem to Azure DSC Automation (Response code: Unauthorized)

I'm having difficulties joining a Windows machine to Azure DSC automation. I'm getting the following error: Registration of the Dsc Agent with the server https://azureserver/accounts/...
0
votes
1answer
66 views

Desired State for MsSQL and IIS (puppet or chef)

In our infrastructure, some developers/consultants change some mssql or iis configurations without any notification which cause us problems. For example, if somebody change mssql recovery simple to ...
4
votes
1answer
791 views

Why can't I use a DSC resource in push mode from a module that is installed in my user's module path?

I have a Powershell DSC custom resource, embedded in a module. The full code is available here if you want to see it, but that may not be necessary; my problem isn't (I think) in the code I wrote, but ...
0
votes
1answer
79 views

Server configuration management [closed]

We have windows servers hosting our software. There is a third party company doing something like penetration testing and provides us with reports and recommendations about the servers' setup/...
2
votes
1answer
2k views

DSC Syntax for Binary Registry Key

What should be a simple registry DSC configuration has turned into a somewhat frustrating piece of guesswork. I'm trying to setting a binary registry key. I am finding it impossible to find the right ...
1
vote
1answer
142 views

Azure DSC validation error on portal

Any ideas on the cause value for the template parameter 'modulesUrl' at line '11' and column '20' is not provided returned when validating a new VM in the Azure Portal with the DSC extension. It's no ...
3
votes
1answer
103 views

DSC pull schedule randomly stops working

I am using DSC to configure 30 servers. They are configured to pull with ApplyAndAutoCorrect. This generally works great, but randomly, servers will stop all DSC activity. The servers never ...
0
votes
1answer
257 views

Desired State Configuration HTTPS Pull Site Doesn't Work

I've created a domain certificate for my DSC web pull server (issued by my internal CA) and retrieved the thumbprint. I exported the certificate from inetmgr and installed it on the pull server (both ...
3
votes
2answers
1k views

Investigating Sysvol replication issues when promoting domain controllers with DSC in Azure

We're using PowerShell DSC to automate the deployment of a number of small self contained environments, in these environments we are deploying 2 domain controllers and use DSC to setup the domain etc. ...
4
votes
1answer
468 views

DSC Environment Resource no longer working after WMF5.1 - not detecting PATH values?

I have a number of Partial DSC scripts that use the Environment Resource to set a Path value. I have two scripts that does this and after upgrading from WMF5.0 to WMF5.1, I am getting the following ...
3
votes
1answer
3k views

Enable-PSRemoting or Set-WSManQuickConfig?

I'm getting pumped up for DSC and I want to cover my bases. I see that Enable-PSRemoting actually runs Set-WSManQuickConfig according to help documentation, I guess my main question is, what is the ...
1
vote
0answers
351 views

DSC Environment resource failing to see environment variable it has set

I'm using DSC to provision virtual machines. The VMs are setup to pull a DSC configuration from a pull server. All is well with this. However, I noticed that I am frequently seeing: Job {8B376B76-...
0
votes
1answer
251 views

Get-DscResource not returning full list when run from Jenkins on Windows

I have a Windows Server 2016 Jenkins build box. I want to run some powershell in a Jenkins job. As a test I have set the job to do this in a Execute Windows batch command build step: powershell -...
2
votes
1answer
1k views

How to create a Hyper-V VM with Powershell DSC and module xHyper-V?

I've been trying to create a VM on my Hyper-V 2016 host from my Windows 10 workstation using module xHyper-V with not a lot of joy. My Hyper-V host is called Lithium and my DSC Script is below. ...