Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
General PowerShell
Get-ACL Permission
Last Post 25 Mar 2010 11:27 AM by
Ricardo
. 0 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Ricardo
New Member
Posts:1
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.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
General PowerShell
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2