Skip to content
DSC resources used to apply and manage local group policies by modifying the respective .pol file.
PowerShell
Branch: dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
DSCResources
Examples
Modules
Tests
.MetaTestOptIn.json
.codecov.yml
.gitattributes
.gitignore
.markdownlint.json
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
GPRegistryPolicyDsc.psd1
LICENSE
README.md First PR into dev (#1) Sep 18, 2019
appveyor.yml

README.md

GPRegistryPolicyDsc

This resource module contains resources used to apply and manage local group policies by modifying the respective .pol file.

This module is an adaptation from GPRegistryPolicy.

This project has adopted this code of conduct.

Branches

master

Build status codecov

This is the branch containing the latest release - no contributions should be made directly to this branch.

dev

Build status codecov

This is the development branch to which contributions should be proposed by contributors as pull requests. This development branch will periodically be merged to the master branch, and be released to PowerShell Gallery.

Contributing

Please see our contributing guidelines.

Installation

GitHub

To manually install the module, download the source code and unzip the contents to the directory '$env:ProgramFiles\WindowsPowerShell\Modules' folder.

PowerShell Gallery

To install from the PowerShell gallery using PowerShellGet (in PowerShell 5.0) run the following command:

Find-Module -Name GPRegistryPolicyDsc -Repository PSGallery | Install-Module

To confirm installation, run the below command and ensure you see the DSC resources available:

Get-DscResource -Module GPRegistryPolicyDsc

Requirements

The minimum Windows Management Framework (PowerShell) version required is 5.0 or higher.

Examples

You can review the Examples directory for some general use scenarios for all of the resources that are in the module.

Change log

A full list of changes in each version can be found in the change log.

Resources

RefreshRegistryPolicy

A resource to detect and invoke a group policy refresh.

Requirements

  • Target machine must be running Windows Server 2008 R2 or later.

Parameters

  • [String] IsSingleInstance (Key): Specifies the resource is a single instance, the value must be 'Yes'

Read-Only Properties from Get-TargetResource

  • [String] RefreshRequiredKey (Read): Returns the value of the GPRegistryPolicy key indicating a group policy refresh is needed.
  • [String] Path (Read): Returns the path of the RefreshRequired property indicating a group policy refresh is needed.

Known issues

All issues are not listed here, see here for all open issues.

RegistryPolicyFile

A resource to manage registry policy entries in a policy (.pol) file.

Requirements

  • Target machine must be running Windows Server 2008 R2 or later.

Parameters

  • [String] Key (Key): Indicates the path of the registry key for which you want to ensure a specific state.
  • [String] ValueName (Key): Indicates the name of the registry value.
  • [String] TargetType (Required): Indicates the target type. This is needed to determine the .pol file path. Supported values are ComputerConfiguration, UserConfiguration, Administrators, NonAdministrators, and Account.
  • [String] AccountName (Write): Specifies the name of the account for an user specific pol file to be managed.
  • [String[]] ValueData (Write): The data for the registry value.
  • [String] ValueType (Write): Indicates the type of the value. Possible values are:"Binary","Dword","ExpandString","MultiString","Qword","String","None"
  • [String] Ensure (Write): Specifies the desired state of the registry policy. When set to 'Present', the registry policy will be created. When set to 'Absent', the registry policy will be removed. Default value is 'Present'.

Read-Only Properties from Get-TargetResource

  • [String] Path (Read): Returns the path to the pol file being managed.

Examples

Known issues

All issues are not listed here, see here for all open issues.

You can’t perform that action at this time.