PowerShell / JEA

Just Enough Administration
http://aka.ms/JEAdocs
MIT License
257 stars 60 forks source link

Problem running example in DemoConfig.ps1, fails on ScriptsToProcess #52

Open johlju opened 6 years ago

johlju commented 6 years ago

The example in DemoConfig.ps1 has a problem with the property ScriptsToProcess. It is assigned a string, but it expects a string array.

https://github.com/PowerShell/JEA/blob/e53cdcb78fb9c80c564f7d0d57d295ca9198ae76/DSC%20Resource/DemoConfig.ps1#L14-L21

Running the example gives this error

Convert property 'ScriptsToProcess' value from type 'STRING' to type 'STRING[]' failed
 At line:12, char:2
 Buffer:
irectResourceAccess";
};^
insta
    + CategoryInfo          : SyntaxError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MiClientApiError_Failed
    + PSComputerName        : localhost

I suggest to change the property ScriptsToProcess to this

ScriptsToProcess    = @('C:\ProgramData\JeaEndpoint\startup.ps1')