gpoguy / admxtodsc Goto Github PK
View Code? Open in Web Editor NEWPowerShell script to convert GPO-based Admin Template/registry.pol settings into a Desired State Configuration Document
PowerShell script to convert GPO-based Admin Template/registry.pol settings into a Desired State Configuration Document
You have scope issues. You define $valueNameHashTable in the main body of your script and expect to reference it inside your nested functions. It most likely works but is not a best practice and could come back later to bite you. If you want to do this you should use a scope identifier like global or script.
Because your internal functions are only called from the main function, there is no need to give them standard names. I often use non-standard names for internal functions to remind me that the user will never see these functions.
What are your long term plans for this? If I have a policy that does things like configure services and event logs, I would want the script to convert those settings to a DSC config because those use out of the box resources like you are using Registry. Eventually, it would be nice to check thinks like a new folder preference and create that configuration using on of the SMBShare resources.
I think the challenge is that the GP cmdlets don't easily expose settings like service configurations. Anyway I'd love to hear more about where you intend to go with this project.
Ran into this one while generating DSCs to test against using DSCEA. With particular policies that have no value listed (see first image below), the Recurse_PolicyKeys function, particularly at line 99's else condition, does not appear to increment past the empty valued key, this getting stuck on it and putting the code into a loop.
For testing, the object it's getting stuck on for me is Computer Configuration > Policies > Software Settings > System > Remote Assistance > Offer Remote Assistance set to Disabled. Script runs without issue when the suspect object is removed from the GPO. Not sure if this condition exists for other objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.