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

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

@johlju

Description

@johlju

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions