Files
PowerShell-PSDscResources/Tests/Integration/MSFT_RegistryResource_KeyAndNameOnly.config.ps1

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
}
}
}