Solved

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

Posted on 2014-01-23
3
244 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
  • 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

Are your end users making ugly email signatures?

Have you left it up to your end users to create their own email signatures? Are they forgetting to add the company logo or using garish font colors? Take control and ensure all users have the same email signature.

Question has a verified solution.

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

Know what services you can and cannot, should and should not combine on your server.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
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 tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now