|
possibly pipe max? Hi,
I am trying to list out perms recursively for a directory via cacls and I
need to remove some strings. Is there a limit to the number of pipes
allowed? I wouldn't think so. Here is the script:
$dir = read-host -prompt "Enter starting directory for cacls list "
dir -r $dir | ?{$_.mode -match "d"}|%{$_.get_fullname()} |%{cacls $_}|%{
$_ = $_.replace("(OI)","")
$_
}
When I do this interactively,it works:
cacls d:\test | %{$_.replace("(OI)","")} |