Information Management Policy Settings for SharePoint SPO Document Libraries

Jeff Kirk 0 Reputation points
2023-10-25T19:16:03.8466667+00:00

We have various policies in different places of our network, but for SPO sites we have various document libraries that have individual retention policies applied configured by using the Information Policy Management Settings. I can't find any documentation though on how to pull the data about those policies. I'd like to have a script in powershell that can crawl through each Site, and retrieve these settings for every document library.

I guess my other question here is, although we can do this, is this the best to of done it? I need to be able to set the retention on each document library individually.

Thanks!

Jeff

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 15,555 Reputation points Microsoft Vendor
    2023-10-26T07:22:13.38+00:00

    Hi @Jeff Kirk,

    Thank you for posting in this community.

    We regret to inform you that there is no PowerShell command that can obtain the retention policy for each document library.

    We can only view all the retention policies for that document library in Information Management Policy Settings.

    image

    Also, if you want to have separate retention policies for each of your document libraries, passing Information Management Policy Settings is a good way to do it. This setting only takes effect for the current document library.

    Please accept my sincerely apologizes for any inconvenience this may cause. Thank you for your kind understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.