Disassembler0 / Win10-Initial-Setup-Script

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019
MIT License
4.7k stars 1.08k forks source link

Any chance you'd covert most of this to Powershell DSC? #191

Closed djdallmann closed 5 years ago

djdallmann commented 5 years ago

I recently made a powershell script that utilized powershell desired state configuration similar to what you have developed with regular powershell scripting interface. I built mine using process monitor to analyze modified registry keys by windows 10 guis, previous experience and some research.

The difference with DSC being is that you can check and enforce your systems state against a set of values quite trivially and dsc in general eliminates quite a large portion of scripting. There is a number of DSC features also in the powershell gallery for functions not supported out of the box.

https://docs.microsoft.com/en-us/powershell/dsc/overview/overview

Take a peek at my git and powershell dsc. https://github.com/djdallmann/GamingPCSetup https://github.com/djdallmann/GamingPCSetup/tree/master/PSDSC

Disassembler0 commented 5 years ago

What benefits would it bring? I see only additional abstraction layer full of disadvantages.

DSC is good if you need to ensure that a bunch of remote computers will have the exact same configuration and that configuration will be kept over time and you can change it from a single place. But this isn't what my script is for.

You can of course give it a try and convert a few tweaks, but I'm pretty sure that at least 30% of the tweaks can't be converted while maintaining the simplicity and coherence. And you are of course more than welcome to push PRs or open issues for features which you're missing from my script. (I've seen several requests for the mouse sensitivity stuff which I see you have in yours, so that would be a nice one.)

djdallmann commented 5 years ago

Thanks for your reply and feedback, it sounds like you may have considered using it but decided not to due to the aforementioned roadblocks for your specific project. Plus you've already gone this far so it may take some time to rebuild or reimplement using a different method.

Cheers.