DSC: Error: Index operation failed; the array index evaluated to null (UserRightsAssignment): Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „right == Error == The following error occurs when you try to run ''Start-DscConfiguration -UseExisting -Wait -Verbose'':<br> '''In…“) |
(kein Unterschied)
|
Version vom 28. Januar 2022, 08:13 Uhr
Error
The following error occurs when you try to run Start-DscConfiguration -UseExisting -Wait -Verbose:
Index operation failed; the array index evaluated to null.
In the Windows Eventlog you can see a similar error, Event ID 4103 in Microsoft-Windows-Desired-State-Configuration/Operational:
This event indicates that a non-terminating error was thrown when DSCEngine was executing Test-TargetResource on MSFT_UserRightsAssignment DSC resource. FullyQualifiedErrorId is NullArrayIndex. Error Message is Index operation failed; the array index evaluated to null..
Cause
This is maybe because your temporary local security policy is corrupt.
DSC uses the PowerShell Module "SecurityPolicyDsc" located at one of the Windows PowerShell module directories.
This module generates a temporary local security Policy (C:\Windows\TEMP\SecurityPolicy.inf). You can see this if you enable the DSC debug log:
Solution
- Rename or delete the temporary local security policy (C:\Windows\TEMP\SecurityPolicy.inf).
- Run your DSC command again and it should work.