header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Get-ACL Permission
Last Post 25 Mar 2010 11:27 AM by Ricardo. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
RicardoUser is Offline
New Member
New Member
Posts:1
Avatar

--
25 Mar 2010 11:27 AM
    Hi

    With xcacls.vbs i can obtain the permission like this:

    \\vfpt-nsfs07\shares1$\migra.bat Allowed BUILTIN\Administrators Full Control This Folder Only

    I have the following powershell script:

    $file = New-Item -type file "c:\freespace.txt"
    $dirToAudit = Get-ChildItem -Path "\\vfpt-nsfs15\share20$" | where {$_.psIsContainer -eq $true}
     
    foreach ($dir in $dirToAudit)
    {
    $colACL = Get-Acl -Path $dir.FullName
    foreach ($acl in $colACL)
    {
    foreach ($accessRight in $acl.Access)
    {
    $a=$dir.FullName + " $($AccessRight.IdentityReference)" + " $($AccessRight.FileSystemRights)"
    Add-Content $file $a
    }
    }
    }

    I have this output: \\vfpt-nsfs15\share20$\123 BUILTIN\Administrators FullControl

    I need to have "This Folder Only,This Folder, Subfolders and Files". What is the property missing?
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer