Command failed (Relevance substitution failed)

First of all, you don’t need to use powershell to do this. You can gather this information using relevance directly. It would only work well in an analysis or a task since it could be slow depending on the number of files, but it would work.


Secondly, there is no need to record the oldExecutionPolicy, change the ExecutionPolicy, and then Set it back again. This is a bad idea and prone to issues, plus all you have to do is call powershell using:

 -ExecutionPolicy Bypass

This will allow the Powershell to execute without changing the current ExecutionPolicy.


The answer to the question you are asking is that the brackets { } tell actionscript to do relevance substitution. If you don’t want relevance substitution, like in this case, then you must escape the brackets.

To escape the brackets, do the following:

{{}

or:

{}}

One or both of the above methods should work.


See these related posts:

1 Like