DSCResources/xRegistryAccess/Build.ps1

New-xDscResource -Name xRegistryAccess -Property `
@(
    (New-xDscResourceProperty -Name Ensure -Type String -Attribute Key -ValidateSet "Absent","Present" ),
    (New-xDscResourceProperty -Name Path -Type String -Attribute Required )
    (New-xDscResourceProperty -Name Account -Type String -Attribute Required ),
    (New-xDscResourceProperty -Name AccessControlType -Type String -Attribute Required -ValidateSet "Allow","Deny"),
    (New-xDscResourceProperty -Name RegistryRights -Type String[] -Attribute Required  #-ValidateSet "CreateLink","ChangePermissions"`
    #,"CreateSubKey","Delete","EnumerateSubKeys","ExecuteKey","FullControl","Notify","QueryValues","ReadKey","ReadPermissions",
   # "SetValue","TakeOwnership","WriteKey"
    ),
    (New-xDscResourceProperty -Name InheritanceFlags -Type String -Attribute Write -ValidateSet "ContainerInherit","None","ObjectInherit"),
    (New-xDscResourceProperty -Name PropagationFlags -Type String -Attribute Write -ValidateSet "InheritOnly","None","NoPropagateInherit"),
    (New-xDscResourceProperty -Name Location -Type String -Attribute Write -ValidateSet "ClassesRoot","CurrentConfig","CurrentUser",
    "DynData","LocalMachine","PerformanceData","Users"
    )
 )