Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-ACL error handling

$
0
0

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


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>