Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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