下列这是报错,我已经获取了我的结果,但是还是报错
Get-Acl : Cannot validate argument on parameter ‘Path’. The argument is n
or empty. Supply an argument that is not null or empty and then try the
command again.
At D:\bt\get-acl.ps1:10 char:13
+ get-acl $lamp[$i]
+ ~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Acl], ParameterBindin
dationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.
Shell.Commands.GetAclCommand
ls d:\lamp -Recurse | Select-Object fullname -first 10 | out-file c:\lamp.txt
$lamp = get-content c:\lamp.txt
$j=$lamp.count
for ($i=2;$i -le $j;$i++)
{get-acl $lamp[$i] }
这时源码,已经获取了我要的结果
Directory: D:\lamp
Path Owner Access
—- —– ——
01 … BUILTIN\Administrators BUILTIN\Administrators…
Kindle Note … BUILTIN\Administrators BUILTIN\Administrators…
MA … NT AUTHORITY\SYSTEM BUILTIN\Administrators…
Mana … BUILTIN\Administrators BUILTIN\Administrators…
PMP … BUILTIN\Administrators BUILTIN\Administrators…
super simple songs(MP3… BUILTIN\Administrators BUILTIN\Administrators…