GithubHelp home page GithubHelp logo

a4zen / baselinemanagement Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/baselinemanagement

0.0 2.0 0.0 1.48 MB

Conversion tool used to Convert Group Policy and SCM baselines into DSC

License: MIT License

PowerShell 87.06% HTML 12.94%

baselinemanagement's Introduction

This solution is built off GPRegistryParser found here: https://github.com/PowerShell/GPRegistryPolicyParser

Upon Importing the Module BaselineManagement Import-Module BaselineManagement

There will be one 3 main cmdlets:

These cmdlets are designed to convert from baselines in Group Policy or SCM into corresponding DSC Configurations and MOF Files.

  • ConvertFrom-GPO - Converts from GPO Backups into DSC Configuration and accompanying MOF

  • ConvertFrom-SCM - Converts from SCMXML into DSC Configuration and accompanying MOF

  • ConvertFrom-ASC - Converts from SCMJSON into DSC Configuration and accompanying MOF

  • ConvertTo-DSC - "proxy" cmdlet that allows you to pass any of the baselines in and then automatically chooses the correct cmdlet for you.

All of the Cmdlets accept pipeline input and have accompanying help text and examples.

Upon passing an appropriate baseline into the proper cmdlet, the tool will automatically convert it into a DSC Configuration and attempt to compile it against localhost. There is also a parameter to output the configuration PS1 file if needed. If there are any errors compiling or creating the configuration, the tool will output a ps1.error file with the configuration text.

The accompanying resources stored in the DSC resources folder are needed to apply the settings. Most can be found on github, but are stored here for convenience.

PLEASE NOTE: If the resources are not copied into a PSModulePath the Configuration will likely not compile.
This is simply because DSC requires that all modules in a Configuration be present in PSModulePath when compiled.

The tool has a conflict resolution engine that will automatically comment out conflicting resources. Ex.

Service Spooler
{
	Name = "Spooler"
	State = "Stopped"
} 

Service Spooler2
{
	Name = "Spooler"
	State = "Running"
}

The same engine will also comment out resources that are marked as DISABLED in SCM baselines.

If comments are available they will be parsed and added above corresponding resources.

  • SCMXML - Comments will be parsed
  • SCMJSON - Comments will NOT be parsed
  • GPO - Comments will NOT be parsed

This tool was designed for two main purposes.

  • Allow conversion of GPOS into DSC for application or auditing.
  • Allow remediation of SCM baselines.

The tool has been thoroughly tested, but needs to be run against a variety of baselines to ensure they are parsed correctly.

TO ASSIST with parsing new baselines:

  • I designed the Pester tests to work off sample baselines stored in the TESTS folder.
    You can replace these with any baselines you want to test conversion of to seee more verbose output.

Additional SCM Baselines are currently in the work

  • Currently Complete: OS

If you have any issues, please submit them and I will get to them as I am able :-)

baselinemanagement's People

Contributors

bobbytreed avatar microsoftopensource avatar msftgits avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.