id: Exchange 2016 Search and Delete version: -1 name: Exchange 2016 Search and Delete description: Run a compliance search in Exchange Server 2016, and delete the results. starttaskid: "0" tasks: "0": id: "0" taskid: 54ef50e9-fe1c-4750-8c0c-0f23d1adcc2f type: start task: id: 54ef50e9-fe1c-4750-8c0c-0f23d1adcc2f version: -1 name: "" description: start iscommand: false brand: "" nexttasks: '#none#': - "1" separatecontext: false view: |- { "position": { "x": 50, "y": 50 } } note: false timertriggers: [] "1": id: "1" taskid: 7039555d-70e8-4c48-8629-9b8377054fe1 type: regular task: id: 7039555d-70e8-4c48-8629-9b8377054fe1 version: -1 name: Start compliance search description: Initiates a compliance search. script: '|||exchange2016-start-compliance-search' type: regular iscommand: true brand: "" nexttasks: '#none#': - "2" scriptarguments: query: complex: root: inputs.Query separatecontext: false view: |- { "position": { "x": 50, "y": 195 } } note: false timertriggers: [] "2": id: "2" taskid: 4bca699e-9654-4bd2-8b5f-56d98abb4714 type: playbook task: id: 4bca699e-9654-4bd2-8b5f-56d98abb4714 version: -1 name: GenericPolling description: |- Use as a sub-playbook to block execution of the master playbook until a remote action is complete. This playbook implements polling by continually running the command in Step #2 until the operation completes. The remote action should have the following structure: 1. Initiate the operation. 2. Poll to check if the operation completed. 3. (optional) Get the results of the operation. playbookName: GenericPolling type: playbook iscommand: false brand: "" nexttasks: '#none#': - "3" scriptarguments: Ids: complex: root: EWS accessor: ComplianceSearch.Name Interval: simple: "15" PollingCommandArgName: simple: search-name PollingCommandName: simple: exchange2016-get-compliance-search Timeout: simple: "10080" dt: simple: EWS.ComplianceSearch(val.Status === 'InProgress' || val.Status === 'Starting').Name separatecontext: true loop: iscommand: false exitCondition: "" wait: 1 view: |- { "position": { "x": 50, "y": 370 } } note: false timertriggers: [] "3": id: "3" taskid: 5b175cb9-d3f6-4b54-8eac-7f64b17abc6e type: regular task: id: 5b175cb9-d3f6-4b54-8eac-7f64b17abc6e version: -1 name: Get compliance search description: Gets the status and results of a compliance search. script: '|||exchange2016-get-compliance-search' type: regular iscommand: true brand: "" nexttasks: '#none#': - "4" scriptarguments: search-name: complex: root: EWS accessor: ComplianceSearch.Name separatecontext: false view: |- { "position": { "x": 50, "y": 545 } } note: false timertriggers: [] "4": id: "4" taskid: ba34205c-fc58-4017-8377-cffd6187b25a type: condition task: id: ba34205c-fc58-4017-8377-cffd6187b25a version: -1 name: Purge compliance search results? description: Purge Compliance Search Results? type: condition iscommand: false brand: "" nexttasks: '#default#': - "9" Purge: - "5" separatecontext: false view: |- { "position": { "x": 50, "y": 720 } } note: false timertriggers: [] "5": id: "5" taskid: b05fb387-956b-4bd3-8250-ece9ec819df4 type: regular task: id: b05fb387-956b-4bd3-8250-ece9ec819df4 version: -1 name: Purge compliance search results description: Purges the results found during the compliance search. script: '|||exchange2016-purge-compliance-search-results' type: regular iscommand: true brand: "" nexttasks: '#none#': - "7" scriptarguments: search-name: complex: root: EWS accessor: ComplianceSearch.Name separatecontext: false view: |- { "position": { "x": 162.5, "y": 895 } } note: false timertriggers: [] "6": id: "6" taskid: 5558f163-14fa-47e2-824f-a59ee77f6f05 type: title task: id: 5558f163-14fa-47e2-824f-a59ee77f6f05 version: -1 name: Done description: Done type: title iscommand: false brand: "" separatecontext: false view: |- { "position": { "x": 50, "y": 1595 } } note: false timertriggers: [] "7": id: "7" taskid: 127a2261-119e-43d2-8e3d-14b73f72516c type: playbook task: id: 127a2261-119e-43d2-8e3d-14b73f72516c version: -1 name: GenericPolling description: |- Use as a sub-playbook to block execution of the master playbook until a remote action is complete. This playbook implements polling by continually running the command in Step #2 until the operation completes. The remote action should have the following structure: 1. Initiate the operation. 2. Poll to check if the operation completed. 3. (optional) Get the results of the operation. playbookName: GenericPolling type: playbook iscommand: false brand: "" nexttasks: '#none#': - "8" scriptarguments: Ids: complex: root: EWS accessor: ComplianceSearch.Name Interval: simple: "15" PollingCommandArgName: simple: search-name PollingCommandName: simple: exchange2016-get-compliance-search-purge-status Timeout: simple: "1440" dt: simple: EWS.ComplianceSearch(val.Status === 'Purging').Name separatecontext: true loop: iscommand: false exitCondition: "" wait: 1 view: |- { "position": { "x": 162.5, "y": 1070 } } note: false timertriggers: [] "8": id: "8" taskid: d183b55d-38f2-4768-86f5-b4a935db4086 type: regular task: id: d183b55d-38f2-4768-86f5-b4a935db4086 version: -1 name: Get compliance search purge status description: Checks the status of the purge operation on the compliance search. script: '|||exchange2016-get-compliance-search-purge-status' type: regular iscommand: true brand: "" nexttasks: '#none#': - "9" scriptarguments: search-name: complex: root: EWS accessor: ComplianceSearch.Name separatecontext: false view: |- { "position": { "x": 162.5, "y": 1245 } } note: false timertriggers: [] "9": id: "9" taskid: a17e54ba-09c7-4ec7-8350-3d64035b7eea type: regular task: id: a17e54ba-09c7-4ec7-8350-3d64035b7eea version: -1 name: Remove compliance search description: Removes the compliance search from the Exchange Server. script: '|||exchange2016-remove-compliance-search' type: regular iscommand: true brand: "" nexttasks: '#none#': - "6" scriptarguments: search-name: complex: root: EWS accessor: ComplianceSearch.Name separatecontext: false view: |- { "position": { "x": 50, "y": 1420 } } note: false timertriggers: [] view: |- { "linkLabelsPosition": { "4_5_Purge": 0.57, "4_9_#default#": 0.1 }, "paper": { "dimensions": { "height": 1610, "width": 492.5, "x": 50, "y": 50 } } } inputs: - key: Query value: {} required: true description: Query for finding mail messages outputs: [] fromversion: '5.0.0' tests: - No test