import-csv "SOME_PATH" | %{Get-Acl -Path $_.Path | Select path -expand Access |`Where-Object {(($_.IdentityReference -like "*SOMETEXT*" -OR $_.IdentityReference -like "*SOME_TEXT*" -AND $_.IdentityReference -notlike "*SOMETEXT*"))}} | export-csv SOME_PATH -NoTypeInformation
I am using the above command to report the list of share drive path mentioned in the excel sheet, need some help to handle the errored path, it should complete the command silently