question

GRajkumar avatar image
0 Votes"
GRajkumar asked GRajkumar commented

Is there a way to get report on IRM enabled Libraries and Lists?

I am not able to find right powershell or a way to get a report on IRM enabled libraries and lists.

What I am looking for is to get list of Libraries and Lists that has been enabled with "IRM policies" from entire Farm. This is for SharePoint 2013.

I would like to capture all the key properties of IRM settings for each of these libraries and lists across the Farm.

It's been bit struggle to get these details as we want understand in-depth before moving to online.

Any help would be appreciated.

windows-server-powershelloffice-sharepoint-server-administration
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am currently looking into this issue and will give you an update as soon as possible.

Thank you for your understanding and support.

0 Votes 0 ·

1 Answer

YiLu-MSFT avatar image
0 Votes"
YiLu-MSFT answered GRajkumar commented

Hi @GRajkumar,
We could use following PowerShell to generate a report on IRM policies and related attributes from entire farm:

 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
        
     #Set Parameters
        
     $ReportOutput="C:\Temp\IRMInventory.csv"
        
     #Delete the Output report file if exists
     If (Test-Path $ReportOutput) { Remove-Item $ReportOutput }
        
     #Get all site collections from the web application
     Get-SPWebApplication | Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL -PipelineVariable Web | ForEach-Object {
     Write-host -f Yellow "Processing Site: "$Web.URL
        
     #Get all lists - Exclude Hidden System lists
     $ListCollection = $Web.lists | Where-Object { ($_.hidden -eq $false) -and ($_.IsSiteAssetsLibrary -eq $false)}
        
     $ResultData = @()
     #Iterate through All lists and Libraries
     ForEach ($List in $ListCollection)
     {
     $ResultData+= New-Object PSObject -Property @{
     'Site Title' = $Web.Title
     'Site URL' = $Web.URL
     'List/Library Name' = $List.Title
     'IRMEnabled' = $List.IrmEnabled
     'IRMReject' = $List.IrmReject
     'IrmExpire' = $List.IrmExpire
        
     }
     }
        
     #Append data to CSV
     $ResultData | Export-Csv $ReportOutput -NoTypeInformation -Append
     }
        
     Write-host -f Green "Report Generated Successfully at : "$ReportOutput

More information about key properties of IRM settings:

SPList.IrmEnabled Property
SPList.IrmReject Property
SPList.IrmExpire Property


If an Answer is helpful, please click "Accept Answer" and upvote it.

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.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I ran this script it came as False for all three properties across the Farm. But actually I know we have enabled some of libraries with IRM and I can see them IRM being enabled.

0 Votes 0 ·

@Yi Lu_MSFT

Looks like this powershell is giving wrong results. It came everything as False, but I know there are some libraries already enabled with IRM

0 Votes 0 ·