microsoft / BaselineManagement

Conversion tool used to Convert Group Policy baselines into DSC
MIT License
266 stars 52 forks source link

Duplicate Resource #28

Closed bobbytreed closed 3 years ago

bobbytreed commented 5 years ago
     UserRightsAssignment 'UserRightsAssignment(INF): Allow_log_on_through_Remote_Desktop_Services'
     {
          Policy = 'Allow_log_on_through_Remote_Desktop_Services'
          Force = $True
          Identity = @('*S-1-5-32-544')

     }
mgreenegit commented 4 years ago

?

jachin84 commented 3 years ago

I think the issue here is if you convert a GPO to a DSC configuration and then that registry key already exists an error is thrown. You have to go back and add the Force parameter. Here is an example I just did:

Job {0CE022D9-39AF-11EB-B1F4-00155D328302} : 
This event indicates that failure happens when LCM is processing the configuration. Error Id is 0x1. Error Detail is The SendConfigurationApply function did not succeed.. Resource Id is [Registry]Registry(INF): HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0\NTLMMinClientSec::[Windows2019Baseline]Baseline and Source Info is C:\Program Files\WindowsPowerShell\Modules\Windows2019BaselineDsc\DSCResources\Windows2019Baseline\Windows2019Baseline.schema.psm1::2501::10::Registry. Error Message is PowerShell DSC resource MSFT_RegistryResource  failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: The registry key at path HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0 already has a value with the name NTLMMinClientSec. To overwrite this registry key value please specifiy the Force parameter as $true. .
mgreenegit commented 3 years ago

Should be resolved by the new registry resource type but if not, we can re-open this issue for tracking to resolution.