Cmdlets/New-CheckedOutFileReport/New-CheckedOutFileReport.ps1

<#
Author:Roger Cormier
Company:Microsoft
Description: This cmdlet will accept a SMAT Checked Out Files CSV file as an input and will report if the file is still checked out, and when the file was originally checked out
#>



[CmdletBinding()]
param(
[parameter(mandatory=$True, position=0, HelpMessage="Supply the path to a CSV file detailing all checked out files that was produced by the SMAT tool")]
[URI]$PathtoCSVFile
)
[array]$Entries = Import-Csv -LiteralPath $PathtoCSVFile.LocalPath
$UniqueSiteURLs = $Entries | Select-object SiteURL -Unique
foreach($UniqueSite in $UniqueSiteURLs)
{
    $CheckedOutFiles = $Entries| Where-Object {$_.SiteURL -eq $UniqueSite}
    $Site = Get-SPSite -Identity $UniqueSite
    foreach($File in $CheckedOutFiles)
    {
        $SPFile = $Site.GetFile($File.File)
        write-host $SPFile.CheckedOutDate
    }


}