This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
Script: Script code fails in first run with an execption. #177
Labels
help wanted
The issue is up for grabs for anyone in the community.
needs investigation
The issue needs to be investigated by the maintainers or/and the community.
Details of the scenario you tried and the problem that is occurring
Code is necessary due to missing permission (Trusted installer is owner and SYSTEM has only read permission)
This code in a script resource fails at the first run (Start-DscConfiguration -UseExisting -Wait -Verbose) with access denied on $key. Second run works without issue. When not using a script resource, but an ordinary script block, this code works in first run:
-------------------- Code -------------------------------------------------------
$definition = @"
using System;
using System.Runtime.InteropServices;
"@
--------------- End of Code ------------------------------------------------------------
Verbose logs showing the problem
Suggested solution to the issue
Code should work in first run with: Start-DscConfiguration -UseExisting -Wait -Verbose
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The text was updated successfully, but these errors were encountered: