Forum Discussion

Clayton Amelia's avatar
Clayton Amelia
Copper Contributor
Jun 12, 2019

Powershell Script to Generate eDiscovery Case

Hello Everyone,

 

Currently working on a series of scripts that I will be using to administrate Office365 regularly for my clients, including one to generate the eDiscovery search and export. In my script I found that the param -OneDriveLocation for New-ComplianceSearch comes up as an invalid parameter.

Get-Help failCmdlet Fail

The whole premise behind this is to automate the user decommissioning process as much as possible, even if the last step is to log into the compliance center and download the clickonce application to export the zipped up export, we can easily save 30~60 minutes per user decommissioning we have to run, with an average of 3 a day it allows my techs on our service desk to work on other tickets during that time frame.

  • Use the -SharePointLocation  parameter.

     

    New-ComplianceSearch testODFB -SharePointLocation https://tenant-my.sharepoint.com/personal/user_domain_com
  • Use the -SharePointLocation  parameter.

     

    New-ComplianceSearch testODFB -SharePointLocation https://tenant-my.sharepoint.com/personal/user_domain_com
    • Clayton Amelia's avatar
      Clayton Amelia
      Copper Contributor
      This definitely worked, not sure why I didn't try this to begin with before jumping on here! Thank you for the quick reply Vasil!

      When checking the properties of the SearchCase object both the SharePointLocation and OneDriveLocation properties have the same contents when adding the OneDrive.

      Now, time to do some reading into downloading contents from Azure blob storage using Powershell to automate the last piece. Will post up on here again if I have any questions, unless there is a different discussion I should post under.

Resources