Hello!
Basically I want a conditional statement, if icacls failed processing any files, then do not continue. Please imagine you are writing a PowerShell script, this script runs$icaclsResult = Icacls.exe $soruce, where $source is a valid folder path.
So now we have the output of the Icacls run inside the variable $icaclsResult. A typical icacls runs last line typically looks as follows :
Successfully processed 12 files; Failed processing 0 files
Is it possible for me to parse the entire icacls result so that I can use the number following Failed processingas a sort-of exitcode?
Thank you in advance.