Forum Discussion
sandeep1947
Nov 13, 2020Copper Contributor
list files based on conditions
Need to list files from multiple paths with its full path, date & time info. The condition is it has to exclude files owned by a specific user and also exclude files from certain folders
- farismalaebSteel Contributor
Try this quick one
$Paths=@('C:\AttendanceReport','C:\Chocolatey') Get-ChildItem $Paths -Recurse | get-acl | where {($_.path -notlike "*\dontInclude\*") -and ($_.Owner -notlike "*System*")}