Solved

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

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

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
A procedure for exporting installed hotfix details of remote computers using powershell
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 configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

747 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

12 Experts available now in Live!

Get 1:1 Help Now