Skip to content
This repository was archived by the owner on Jan 27, 2021. It is now read-only.

Latest commit

 

History

History
96 lines (72 loc) · 2.11 KB

File metadata and controls

96 lines (72 loc) · 2.11 KB

Factory Reset

Overview

Factory reset re-applies a factory-image on the device restoring all components and their data to the original state. This means that any updates that got installed will not be present after the reset.

Handler Identifier Plug-in Binary
StartFactoryResetCmd FactoryResetPlugin.dll

Life Cycle and Start-up Configuration

  • Active

    • Always.
  • Start-up Configuration

Name Type Required Description
textLogFilesPath string no If not empty, the handler will log to a text file created at the path specified. The format of log file name is: AzureDM.deviceInfo.<date_time>.log

Example:

In the device-agent configuration file, add the following snippet under handlers:

{
  "textLogFilesPath": "c:\logs"
}

Payload

Name Required Type Description
partitionGuid Yes String Guid of the partition holding the recovery image.
clearTpm No Bool If true, it clears the TPM.

Sample payload:

{
    "__meta": {
        "serviceInterfaceVersion": "1.0.0"
    },
    "partitionGuid": "guid",
    "clearTpm": true
}

Outputs

Return Values

  • Success:

    • Code: 200
    • Payload:
    {}
  • Failure:

    • Code: 400
    • Payload:
        {
            <error object content>
        }
        

Device Twin

{
    "properties": {
        "reported": {
            "StartFactoryResetCmd": {
                "__meta": {
                    <meta data object content>
                },
                "__errors": {
                    "StartFactoryResetCmd": {
                        <error object content>
                    }
                }
            }
    }
}

For details on referenced object schemas:


Home | Device Agent | Reference