Skip to content

Instantly share code, notes, and snippets.

@drclean
Forked from rkyttle/DSCEARegistryTest1.ps1
Created February 16, 2018 12:47
Show Gist options
  • Select an option

  • Save drclean/6913899a036a2feadf655384b6fe395c to your computer and use it in GitHub Desktop.

Select an option

Save drclean/6913899a036a2feadf655384b6fe395c to your computer and use it in GitHub Desktop.
configuration DSCEARegistryTest1 {
param([string[]]$ComputerName='localhost')
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node $ComputerName {
Registry 'CrashOnAuditFail' {
Ensure = 'Present'
Key = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa'
ValueName = 'crashonauditfail'
ValueType = 'Dword'
ValueData = '1'
}
}
}
DSCEARegistryTest1 -OutputPath .\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment