Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nyanhp/gpotodsc

Group Policy Export to DSC converter
https://github.com/nyanhp/gpotodsc

Last synced: 16 days ago
JSON representation

Group Policy Export to DSC converter

Awesome Lists containing this project

README

        

# GPO to DSC

This little module enables a conversion from GPO exports in the PolicyRules format to DSC configurations.

## Installation

```powershell
Install-Module GpoToDsc
```

## Usage

1. Download and familiarize yourself with the Microsoft Security Compliance Toolkit 1.0 from
1. Create some PolicyRules files for the policies you would like to convert
1. Enjoy!

After you have generated the necessary policies, usage is simple:

### DSC

```powershell
ConvertTo-G2DValidation -Path ./Policies -SkipMerge | Export-G2DConfiguration -Path D:\temp
```

After which n PowerShell scripts as well as n MOF files will have been created. You could use these with
DSCEA or Test-DscConfiguration. Or if you are confident you can apply them to any environment...

### Pester

To generate Pester tests instead of DSC configurations, use the following:

```powershell
ConvertTo-G2DValidation -Path ./Policies -SkipMerge | Export-G2DPesterSuite -Path D:\temp
```

### Generate distributable archive

With both DSC and Pester validations you can generate self-contained archives that contain the necessary
modules as well as the output i.e. MOFs and Pester tests.

```powershell
ConvertTo-G2DValidation -Path ./Policies -SkipMerge | New-G2DArchive -Path D:\tmp\Distributable.zip
```