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.
For each merge to the branch master
a preview release will be
deployed to PowerShell Gallery.
Periodically a release version tag will be pushed which will deploy a
full release to PowerShell Gallery.
Please check out common DSC Community contributing guidelines.
To manually install the module, download the source code and unzip the contents to the directory '$env:ProgramFiles\WindowsPowerShell\Modules' folder.
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
The minimum Windows Management Framework (PowerShell) version required is 5.0 or higher.
You can review the Examples directory for some general use scenarios for all of the resources that are in the module.
A full list of changes in each version can be found in the change log.
- RefreshRegistryPolicy A resource to detect and invoke a group policy refresh.
- RegistryPolicyFile A resource to manage registry policy entries in a policy (.pol) file.
A resource to detect and invoke a group policy refresh.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
IsSingleInstance (Key): Specifies the resource is a single instance, the value must be 'Yes'
[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.
All issues are not listed here, see here for all open issues.
A resource to manage registry policy entries in a policy (.pol) file.
- Target machine must be running Windows Server 2008 R2 or later.
[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'
.
[String]
Path (Read): Returns the path to the pol file being managed.
- Disable SMB1
- Disable SMB1 not configured
- Disable desktop changes, Target type is Account
- Configure lanman dependant services, MutiString datatype example
All issues are not listed here, see here for all open issues.