DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Long running mode for DSC

Open SteveL-MSFT opened this issue 4 months ago • 2 comments

Summary of the new feature / enhancement

For integration into other products, it would make sense to have a dsc long-running mode which can accept multiple operations and not exit the process.

Proposed technical implementation details (optional)

Probably a --server-mode type switch that has dsc.exe accept JSON commands to execute. Commands would be taken serially. Something of the form:

{
  "DSCRequest": {
    "id": "anything the client providers",
    "operation": "get",
    "configuration": { },
    "configurationFile": "path",
    "traceLevel": "info",
  }
}

Where the properties would match many of the dsc command line arguments. An additional:

{
  "DSCResponse": {
    "id": "returns what the client provides",
    "status": "completed"
  }
}

This would indicate that the operation completed or had an error (like Request was invalid).

Can also have a specific command like:

{
  "DSCRequest": {
    "operation": "exit"
  }
}

This would tell dsc.exe to clean-up and exit.

SteveL-MSFT avatar Apr 22 '24 19:04 SteveL-MSFT