Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

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

Open
johlju opened this issue Aug 13, 2018 · 0 comments
Open

Comments

@johlju
Copy link

johlju commented Aug 13, 2018

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

JeaEndpoint Endpoint
{
EndpointName = "Microsoft.PowerShell"
RoleDefinitions = "@{ 'CONTOSO\DnsAdmins' = @{ RoleCapabilities = 'DnsAdmin' } }"
TranscriptDirectory = 'C:\ProgramData\JeaEndpoint\Transcripts'
ScriptsToProcess = 'C:\ProgramData\JeaEndpoint\startup.ps1'
DependsOn = '[File]DnsAdminRoleCapability'
}

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')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant