Contributor

Hi All

 

I wonder if anyone can help.  I am trying to add a list of onedrive for business sites to a dlp policy.  The code I am using is:

 

$new = import-csv C:\Temp\sitestoadd.csv

$newlocations = $new.OD4BSites

Set-DlpCompliancePolicy -Identity "Personally Identifiable Information (PII) - External" -AddOneDriveLocation $newlocations

 

I am getting the error shown below:

 

Cannot process argument transformation on parameter 'AddOneDriveLocation'. Cannot convert value "https://xxxuk-my.sharepoint.com/personal/x_xxxxx_xxx_com to type "Microsoft.Exchange.Data.MultiValuedProperty`1[System.String]" + CategoryInfo : InvalidData: (:) [Set-DlpCompliancePolicy], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-DlpCompliancePolicy
+ PSComputerName : eur03b.ps.compliance.protection.outlook.com

 

I have searched and searched but cannot find an answer.

 

 

Does anyone have any ideas?

 

Many thanks

We support Ukraine and condemn war. Push Russian government to act against war. Be brave, vocal and show your support to Ukraine. Follow the latest news HERE