A while ago I was asking questions about using python to secure windows. This was an answer I recieved. Could someone tell me how someone would do this?
"As an overall way to do it, if you can find out which settings are contained in the registry, it's not difficult to create/write registry keys to which you have access. Other settings, such as GPOs, are harder to do. Sometimes you can change those with Powershell - so you may need to have Python call Powershell to configure some of those settings. If you aren't on a domain and are using local policies, you can configure a master policy file that you have Python replace.
On the whole, if you're looking to configure settings for new devices, a better way to do that would be to create them on a VM and use DISM to snapshot a sysprepped image and then lay it down on a new device. That's the more "Windows-y" way to do it."
- baldPrussian