function set-rights ($path) { $p = Get-Item $path; if ($p.Attributes -eq ‘Directory‘) { foreach ($child in Get-ChildItem $p.FullName) { set-X($child.FullName); } } icacls $p.FullName /grant ‘everyone:f‘; } $path="E:\abc"; set-rights($t);
标签:get function blog nbsp post icacls att 遍历文件夹 ica
function set-rights ($path) { $p = Get-Item $path; if ($p.Attributes -eq ‘Directory‘) { foreach ($child in Get-ChildItem $p.FullName) { set-X($child.FullName); } } icacls $p.FullName /grant ‘everyone:f‘; } $path="E:\abc"; set-rights($t);
powershell遍历文件夹设置权限,解决文件无法删除的问题。
标签:get function blog nbsp post icacls att 遍历文件夹 ica
原文地址:https://www.cnblogs.com/mokeyish/p/8278945.html