mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
40 lines
714 B
PowerShell
40 lines
714 B
PowerShell
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[System.String]
|
|
$ConfigurationName
|
|
)
|
|
|
|
Configuration $ConfigurationName
|
|
{
|
|
param
|
|
(
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateNotNullOrEmpty()]
|
|
[System.String]
|
|
$Key,
|
|
|
|
[ValidateSet('Present', 'Absent')]
|
|
[System.String]
|
|
$Ensure = 'Present',
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
[System.String]
|
|
[AllowEmptyString()]
|
|
$ValueName
|
|
)
|
|
|
|
Import-DscResource -ModuleName 'PSDscResources'
|
|
|
|
Node localhost
|
|
{
|
|
Registry Registry1
|
|
{
|
|
Key = $Key
|
|
Ensure = $Ensure
|
|
ValueName = $ValueName
|
|
Force = $true
|
|
}
|
|
}
|
|
}
|