Open Gijsreyn opened 2 weeks ago
@denelon Hello, I thought giving a shot on the Windows Update settings. Althought I came pretty far and I left the PR as draft, there are some oddities I need help with. Hopefully you (or others) can help me out:
I couldn't find any relevant documentation if these keys are actually required, or if the keys that are being set now, are sufficient.
@crutkas and I have been working on some of the challenges with Windows update for his setup. There are some new ACL changes associated with some registry keys in newer versions of Windows, and we've been working on the "right" way to do this.
I don't know if you've seen the experimental "configureSelfElevate" feature in WinGet, but if you decorate the configuration file appropriately, you'll get a single UAC when running a configuration with one or more resources requiring elevation. That doesn't really help with the challenges here, but it's worth mentioning.
That's pretty cool Demitrius. If you have any insights already what keys require to be targeted, I can include them already if the build version is higher than ...
I'm learning every day, thanks for sharing. If you have any links to the experimental features, I will check it out :)
Little off topic. I like the setup what I'm seeing. I was working with DevHome. While I like the GUI, you can guess by now that I also love to automate as much as possible. My setup is a bit different compared to the one from Clint. Because I opted to use the DevHome Hyper-V option, I tried to automate it with DSC resources. It's a combination between the HyperVDsc module, dsc.exe
, winget.exe
, and some PowerShell code.
When attempting to set it up, I found myself creating a bunch of PowerShell script already. I really wanted to add it either on the DevHome repository, or here demonstrating a combination between multiple orchestrations tools. That brings me already to the point you've already mentioned already during your PSConfEU 2024 presentation. There are still pain points to fully automate it.
To sum it up some of the notes I took:
Invoke-WebRequest
. Then I attempt to run Invoke-Command
, which unfortunately cannot be done. The -Credential
option doesn't allow for a blank password (pity). I have to login manually, reset the password, and kick off the processExperimental features in WinGet can be found using winget features
. If you run winget features --help
or winget features -?
you'll get the link to the help document at GitHub.
Yeah, there are still plenty of rough edges leading you to use the Script resource. We're trying to find the examples where that's necessary so we can reason through gaps in implementation or missing DSC Resources.
Secrets are always a challenge when using Configuration as Code. Lots of products default with no password or a well-known password, and it's a bit tricky to ensure they aren't present in configuration files. This is definitely an area we will need to explore further to come up with some best-practices and model them.
I'll reach out to the PowerShell team to see what they are thinking in regard to PSResourceGet and installing modules.
Related to:
Demitrius, can I put this PR on review to get some assistance on writing unit tests, and get an alpha release available somewhere?
You bet :)
Can’t wait to try this out!
@ryfu-msft Hey champ, can you take a look with your magic eyes and hopefully give me some assistance in writing Pester tests?
Bandwith PCs wmiprvse
PCs wmiprvse
wmiprvse
It looks like there are conflicts in this PR now. If you're still working on it, it might be best to convert it to a draft, but if you're ready for review, keep it open after you fix the conflicts :)
PCs wmiprvse
finalstate
Oops. I made a mistake. It should be fixed now. There are also tests added now and while adding the test, I found two caveats, which were quite interesting. If there are any suggestions on it to do it differently, then please let me know.
Originally I designed the validation checking within a function. This was replaced after the suggestion of Kaleb: 7ed2c35. Here came the challenge: when performing testing, when the validation is not within the range of of zero, it cannot grab the original state. That's why I added an additional check in when that particalur property is set. Second challenge was the fact that when specifying either Pct/Bps, it throws an error. Now I'm simply removing the parameters. I'm going to be honest here, there is some rework in here which I totally miscalculate. If either set is provided as properties, it should remove the others, otherwise both settings don't work.
Because the pull request is already quite large, I hope it can be pulled in. I'll fix this one later and add it as TODO on #104 . If not, please let me know.
Addresses the Microsoft.Windows.Setting.WindowsUpdate on #34