function Check-RecentAccess {
[CmdletBinding()]
    Param(
        [Parameter(ValueFromPipeline=$true)]
           [int]$days=1
    )
$StartTime = (get-date) - (new-timespan -days $days)
$List=gci * | where {!$_.psiscontainer}
$Query= foreach ($i in $List) { gci $i |Select FullName,*Time, @{Label="Access";Expression={get-acl $_.PSChildName| % {$_.AccessToString}}}, @{Label="Owner";Expression={get-acl $_.PSChildName| % {$_.Owner}}}}
$Query | Select LastAccessTime,CreationTime,FullName,Owner,Access| where {$_.LastAccessTime -gt $StartTime} |Sort -descending LastAccessTime
}