locked
How to set retention policy using powershell RRS feed

  • Question

  • Hello I am trying to add retention policy to sharepoint online using below code. It fails saying 

    Sharepoint 'All' location cannot be combined with individual locations. can someone help here

    ---------

    import-Module ExchangeOnlineManagement
    Connect-IPPSSession -UserPrincipalName abc@xyz.onmicrosoft.com


    Set-RetentionCompliancePolicy -Identity "testFilesRetention" -AddSharePointLocation "itecollectio3" -Comment "Added new policy, 10/9/20"n


    Regards 


    • Edited by wiki_vk Friday, September 11, 2020 3:00 AM
    Friday, September 11, 2020 3:00 AM

Answers

  • One needs to add the first site manually and then other sites would work.

    Regards Vaibhav Kaulkar

    • Marked as answer by wiki_vk Wednesday, October 21, 2020 11:43 AM
    Wednesday, October 21, 2020 11:43 AM