I know I can ensure the presens of a specific registry value by using the following scriptblock:
Registry ConfigureRegistry
{
Ensure = 'Present'
Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\SomeKey'
ValueName = 'MachineType'
ValueData = 'Hyper-V'
}
But how can I delete the registry key SomeKey
? If I only change the keyword Ensure = "Present"
to Ensure = "Absent"
it will leave the key SomeKey
...