Files
PowerShell-PSDscResources/Examples/Sample_RegistryResource_RemoveValue.ps1
2019-04-28 18:51:33 +01:00

20 lines
494 B
PowerShell

<#
.SYNOPSIS
Removes the registry key value MyValue from the key
'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'.
#>
Configuration Sample_RegistryResource_RemoveValue
{
Import-DscResource -ModuleName 'PSDscResources'
Node localhost
{
Registry Registry1
{
Key = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
Ensure = 'Absent'
ValueName = 'MyValue'
}
}
}