Solved

Powershell: Need help with function that returns NTFS permissions on folder

Posted on 2014-01-23
3
247 Views
Last Modified: 2014-04-02
Hi,

I found this script that enumerates NTFS permissions on a share. The script works great, but i would like to have some extra functionality, if possible.

The script can be found here: Script
(Also attached to this Question)

Let me first explain the filesystem structure:

[folder]
2x [filesystem group] Read of write
[rolebased group]
[Users]

So a user is member of a role based group, the rolebased group is member of a filesystem group that gives it read or write permissions to a folder.

Th script as it is now, shows the names of the filesystemgroup and than enumerates the rolebased groups and than shows the usernames.
It does not show the name of the rolebased groups.

What I would like to have as output:
Name of the filesystemgroup and the names of the rolebasedgroups that are member of this filesystemgroup. Usernames would be great, but do not have the highest priority.

Am I asking the impossible, or is there someone who can accomplish this challenge ?

Thanks in advance !
0
Comment
Question by:Loyall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
x-men earned 500 total points
ID: 39803233
change the line:
$Users = Get-ADGroupMember -Recursive -Identity $gp

to:
$Users = Get-ADGroupMember -Identity $gp
0
 
LVL 2

Author Comment

by:Loyall
ID: 39804156
Hi Sage,

That did the trick.
Thanks a lot !
Just out of curiousity, what if i wanted to have ánd groupname ánd username ?
Is there an easy way to do that, or do you need to rewrite the entire script ?
0
 
LVL 2

Author Closing Comment

by:Loyall
ID: 39971548
Thanks !
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In-place Upgrading Dirsync to Azure AD Connect
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question