When running a Script Task that contains tokens (eg: %COMPNAME%) , this is evaluated and executed successfully via Quick Run or within a Client Job or Server Job.
If the Script Task is added and used within a Managed Software Delivery Policy then the tokens are not evaluated and the script executes without them.
Managed Software Delivery allows you to add a script task to the policy, and edit the task to add tokens, however they are not evaluated and serve no purpose in this use case.
This functionality is working as per the current design, since tokens are evaluated by the Task Server.
Tokens within scripts are evaluated by the task server when run as an individual task or part of a job.
Tokens within scripts cannot be used when adding tasks to Managed Software Delivery polices. The scripts must use standard system variables that are present on the client.
The processes and plugins used are different for tasks run by task server and tasks run by Managed Software Delivery policies.
ITMS 7.1 SP1