$result = Remove-AzDataLakeGen2AclRecursive -FileSystem "filesystem1" -Path "dir1" -Acl $acl -Context $ctx
WARNING: To find the ACL Entry to remove, will only compare AccessControlType, DefaultScope and EntityId, will omit Permission.
$result
FailedEntries : {dir1/dir2/file4}
TotalDirectoriesSuccessfulCount : 500
TotalFilesSuccessfulCount : 2500
TotalFailureCount : 1
ContinuationToken : VBaHi5TfyO2ai1wYTRhIL2FjbGNibjA2c3RmATAxRDVEN0UzRENFQzZCRTAvYWRsc3Rlc3QyATAxRDY2M0ZCQTZBN0JGQTkvZGlyMC9kaXIxL2ZpbGUzFgAAAA==
$result.FailedEntries
Name IsDirectory ErrorMessage
---- ----------- ------------
dir0/dir2/file4 False This request is not authorized to perform this operation using this permission.
# user need fix the failed item , then can resume with ContinuationToken
$result = Remove-AzDataLakeGen2AclRecursive -FileSystem "filesystem1" -Path "dir1" -Acl $acl -ContinuationToken $result.ContinuationToken -Context $ctx
WARNING: To find the ACL Entry to remove, will only compare AccessControlType, DefaultScope and EntityId, will omit Permission.
$result
FailedEntries :
TotalDirectoriesSuccessfulCount : 100
TotalFilesSuccessfulCount : 1000
TotalFailureCount : 0
ContinuationToken :
$result = Remove-AzDataLakeGen2AclRecursive -FileSystem "filesystem1" -Path "dir1" -Acl $acl -ContinueOnFailure -Context $ctx
$result
FailedEntries : {dir0/dir1/file1, dir0/dir2/file4}
TotalDirectoriesSuccessfulCount : 100
TotalFilesSuccessfulCount : 500
TotalFailureCount : 2
ContinuationToken : VBaHi5TfyO2ai1wYTRhIL2FjbGNibjA2c3RmATAxRDVEN0UzRENFQzZCRTAvYWRsc3Rlc3QyATAxRDY2M0ZCQTZBN0JGQTkvZGlyMC9kaXIxL2ZpbGUzFgAAAA==
$result.FailedEntries
Name IsDirectory ErrorMessage
---- ----------- ------------
dir0/dir1/file1 False This request is not authorized to perform this operation using this permission.
dir0/dir2/file4 False This request is not authorized to perform this operation using this permission.
# user need fix the failed item , then can resume with ContinuationToken
foreach ($path in $result.FailedEntries.Name)
{
# user code to fix failed entry in $path
#set ACL again
Remove-AzDataLakeGen2AclRecursive -FileSystem "filesystem1" -Path $path -Acl $acl -Context $ctx
}