Summary of the new feature / enhancement
There might be an existing CLI tool or the developer wants their CLI tool to serve as both a user facing tool but also DSC resource. So in that case, they wouldn't want to receive and process a JSON payload.
Proposed technical implementation details (optional)
In the resource manifest, we can add support for expressions for the args:
{
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
"type": "Microsoft.Windows/User",
"version": "1.0.0",
"set": {
"executable": "net.exe",
"args": [
"user",
"[input().name]",
"[input().password]",
"/add"
]
}
}
input() would be a new function that returned the values under properties. Normal dot-notation rules apply. Any functions that result in an object would be an error. secureString would resolve to plain-text.
For get and export, the tool would still be required to return JSON output and the manifest would specify something like:
Summary of the new feature / enhancement
There might be an existing CLI tool or the developer wants their CLI tool to serve as both a user facing tool but also DSC resource. So in that case, they wouldn't want to receive and process a JSON payload.
Proposed technical implementation details (optional)
In the resource manifest, we can add support for expressions for the args:
input()would be a new function that returned the values underproperties. Normal dot-notation rules apply. Any functions that result in an object would be an error.secureStringwould resolve to plain-text.For
getandexport, the tool would still be required to return JSON output and the manifest would specify something like: