Find all checked out files in the farm

Here’s a better script I found to get all checked out files on the farm. You can just add the check-in code from my previous blog if needed.

function Get-CheckedOutFiles() {

    foreach ($web in (Get-SPSite -Limit All | Get-SPWeb -Limit All)) {

        Write-Host “Processing Web: $($web.Url)…”

        foreach ($list in ($web.Lists | ? {$_ -is [Microsoft.SharePoint.SPDocumentLibrary]})) {

            Write-Host “`tProcessing List: $($list.RootFolder.ServerRelativeUrl)…”

            foreach ($item in $list.CheckedOutFiles) {

                if (!$item.Url.EndsWith(“.aspx”)) { continue }

                $hash = @{





                New-Object PSObject -Property $hash


            foreach ($item in $list.Items) {

                if ($item.File.CheckOutStatus -ne “None”) {

                    if (($list.CheckedOutFiles | where {$_.ListItemId -eq $item.ID}) -ne $null) { continue }

                    $hash = @{





                    New-Object PSObject -Property $hash







Get-CheckedOutFiles | Out-GridView

From here –>

About these ads

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: