Enumerate the users that have access to a particular directory

Hi, my name is Jennifer and I have been searching for an answer to my problem through several blogs. The problem is that I have a Directory of which I want to not only retrieve the users\groups that have access to it but also enumerate through the groups
to list actual users. The groups part is the main issue here. If I use get-acl, I can return any number of particular Active Directory groups that have access, however, I need to list the users inside this group and get-acl will not output an object I can
work with. I thought I could do something like this (which I may have seen on this forum before):
get-acl "C:\NestedGroupTest" | %{$_.access} \ ft -property identityreference
This will return the groups\users that have access. Example:
Domain\OU
NT Authority\system
Builtin\users
ETC...
I have tried exporting this output to a file and then trying to use get-adgroupmember (which obviously will not work on the non-AD groups) but the objects are of the wrong type so basically nothing in the Active Directory module will work...
This seems like such a simple issue but it is causing me grief to no end...please help

I can't guarantee that this will work in all cases, but it seems to work on my test domain. Warning: it's very slow and inefficient. It requires
this module (get the 3.0 test version), but you can modify the foreach block's code somewhat to get it to work with Get-Acl. 
Get-Item C:\NestedGroupTest | Get-AccessControlEntry | ForEach-Object { $PropertyNames = $null }{
if (-not $PropertyNames) {
# We need to copy the property. This will get a list
# of the properties on each ACE when it encounters
# the first ACE (since the rest of this is so ineffecient,
# we can feel good that we saved some work by doing this)
$PropertyNames = $_ | Get-Member -MemberType Properties | select -exp Name
# Create a new hashtable that will be used to create a PSObject
$NewObjectProps = @{}
foreach ($CurrentProperty in $PropertyNames) {
$NewObjectProps.$CurrentProperty = $_.$CurrentProperty
# Check to see if this SID belongs to an AD group
Write-Verbose ("Current principal: {0}" -f $_.Principal)
try {
$Group = Get-ADGroup -Filter { SID -eq $_.SecurityIdentifier } -ErrorAction Stop
catch {
# Write a warning or something?
if ($Group) {
Write-Verbose " -> Group, so looking up members"
$Users = $Group | Get-ADGroupMember -Recursive | select @{N="Principal"; E={$_.SID.Translate([System.Security.Principal.NTAccount])}}, @{N="SecurityIdentifier"; E={$_.SID}}
else {
Write-Verbose " -> Not an AD group"
$Users = $_ | select Principal, SecurityIdentifier
# Go through each user/non-translated group, modify two
# hashtable properties, and create the new PSObject
$Users | ForEach-Object {
$NewObjectProps.SecurityIdentifier = $_.SecurityIdentifier
$NewObjectProps.Principal = $_.Principal
$NewObject = New-Object PSObject -Property $NewObjectProps
# This will make the new object show the module's custom formatting:
$NewObject.pstypenames.Insert(0, "PowerShellAccessControl.Types.AdaptedAce")
$NewObject
That should resemble the output that Get-AccessControlEntry would give you, but AD groups have been translated to users. If you pipe that to Export-CSV, you'd have plenty of information for each ACE, including the path, principal, security identifier, access
mask, etc. You could also pipe that to Select-Object and just ask for certain properties (try it with these properties: Path, Principal, AccessMask, AccessMaskDisplay, AppliesTo).
You can also use the Get-AccessControlEntry function's parameters to do some filtering on the ACEs that are returned (maybe you only want ACEs with FullControl, or ACEs that were not inherited...)
Give it a shot and let me know if it works for you. If you need more explanation of what's going on in the foreach-object process block, let me know and I'll try to help. It can be modified to work with version 2.1 of my module, and with Get-Acl.

Similar Messages

  • PowerShell - List all users that have access to a particular SPLIstItem

    Hi there,
    In PowerShell - how to list all users that have access to a particular SPLIstItem?
    Thanks so much in advance.

    Hi frob,
    According to your description, my understanding is that you want to list all users who have access to a particular SharePoint list item via PowerShell.
    You can use the following PowerShell command:
    $web = Get-SPWeb http://sp/sites/First
    $list=$web.Lists["listV2"]
    $item=$list.Items | where {$_['ID'] -eq 1}
    $item | Select -ExpandProperty RoleAssignments |Select {$_.Member.DisplayName}, {$_.Member.LoginName}, RoleDefinitionBindings
    In the above command, you need to change the web URL to your site's URL, change “listV2” to the name of your list, and change the ‘1’ to the ID of the list item.
    The result looks like:
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Assigning View permission to all the users that have been selected in contact selector - SP 2010, InfoPath 2010

    I have a SharePoint InfoPath 2010 browser form with item level security. Only submitter
    and approvers has access to the form.  This form contains a people picker that is populated with the names of attendees
    for the meeting they attended (which
    I am able to store in Field2 below). I want to allow attendees to be able to view (grant view permission) the InfoPath form. Field 2 has the users in form of domain\user1;domain\user2; etc. Following the below step, I am getting error when I ADD or REPLACE
    permission on current item. How do I go about assigning view permission to all the users that have been selected in contact selector?
    Jitu

    Hi ,
    i understand that the text box and the people picker hold multiple user names and you want to grant user permission based on the user in the text box.
    I have a test based on your description,the results are: When there are multiple users in the text box, the workflow will throw an error'Error Occurred'.It is the same with the people picker column.
    You need to limit the peopel picker to only allow to select one user,in this way the text box will only hold one user.Then you can use the people picker or the text box to grant user permission.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • How can I list all users who have access to a particular TABLE or VIEW

    Hi,
    Can someone tell me how I can list all users who have access to a particular TABLE or VIEW.
    Abhishek

    Hi,
    Take a look on this link: http://www.petefinnigan.com/tools.htm
    Cheers

  • How do I include the photos in a imovie project to the finished dvd so the users can have access to them?

    I've included alot of old photos in an iMovie project and would like to include them on the finished DVD I create with iDVD. I woud like the users to be able to have access to them so they can print them, store them on their own computer or whatever they would like to do. How would I do this?

    You do this by creating a DVD-ROM section on your DVD. See this explanation from iDVD Help.
    Adding files to the DVD-ROM portion of a disc
    You can let viewers copy files directly from your DVD by adding the files to the DVD-ROM portion of the disc. These files are burned onto the DVD and are accessible when the disc is viewed on either a Windows PC or a Macintosh computer, but not a DVD player.
    You can add any kind of file to the disc. For example, if your disc contains a slideshow, you can add the image files to the DVD-ROM portion of the disc so viewers can download them to their own computers and print them. You can also add a file containing your movie production notes and other “extras.”
    To manually add files to the DVD-ROM part of your disc:
    Choose Advanced > Edit DVD-ROM Contents.
    The DVD-ROM Contents window opens.
    Click Add Files, or click New Folder first if you want to create a folder to put the files in.
    Browse to select your files or folders, then click Open to add them to the disc.
    You can also drag files directly to the DVD-ROM Contents window. When you are done, just close the window.
    When you add a file to the DVD-ROM portion of your disc, before you burn the disc the project contains just a reference to the location of the file on your hard disk, not the actual file. So if you delete a file from your computer or move it from its location after adding it to the DVD-ROM contents, you get a “File not found” message when you try to burn your disc. You can either remove these missing files from the DVD-ROM contents or find them on your computer and put them back in the original location so iDVD can access them.
    As you add files to the DVD-ROM contents, be sure to check the DVD Capacity meter in the Project Info window to find out how many gigabytes of disc space are being used. The Capacity meter shows the disc space taken up by the video portion of the disc as well as the DVD-ROM portion.

  • Query: to view all users that have been created for access to a database

    Hi,
    Is there a command syntax that we could give to see all the users who have been created for access to a particular database. I want to view all the users that have been created using sql* plus.
    can anyone help or is it impossible?
    Thanks

    This is for begging:
    [email protected]> select grantee, privilege from dba_sys_privs where privilege like '%CREATE%SESSION%
    2 /
    GRANTEE PRIVILEGE
    A CREATE SESSION
    AA CREATE SESSION
    U1 CREATE SESSION
    U2 CREATE SESSION
    BD1 CREATE SESSION
    DBA CREATE SESSION
    EMI CREATE SESSION
    MOB CREATE SESSION
    ODM CREATE SESSION
    OHP CREATE SESSION
    SEC CREATE SESSION
    SYS CREATE SESSION
    TU1 CREATE SESSION
    TU2 CREATE SESSION
    U01 CREATE SESSION
    XDB CREATE SESSION
    MOBI CREATE SESSION
    OHP4 CREATE SESSION
    PFAY CREATE SESSION
    UD01 CREATE SESSION
    UR01 CREATE SESSION
    ADHOC CREATE SESSION
    BATCH CREATE SESSION
    DEBUG CREATE SESSION
    DEV01 CREATE SESSION
    HRAPP CREATE SESSION
    MDSYS CREATE SESSION
    MOBI2 CREATE SESSION
    SKING CREATE SESSION
    SPACE CREATE SESSION
    UPASS CREATE SESSION
    WKSYS CREATE SESSION
    CTXSYS CREATE SESSION
    ORDSYS CREATE SESSION
    PRAC01 CREATE SESSION
    RTABLE CREATE SESSION
    CONNECT CREATE SESSION
    Than you have to select also all the users that have granted roles with this privilege
    this will give you the full set of users who can connect
    Best Regards
    Krystian Zieja / mob

  • NEED TO DETERMINE USERS THAT HAVE LOGGED IN WITH A SPECIFIC ROLE

    I have a requirement to determine which users have logged in with a specific
    role or accessing a specific application. I know I can use the
    ORASSO.WWSSO_AUDIT_LOG_TABLE_T table to see the users that have logged in, but
    need to know which table to join with in order to determine which group that a
    user belongs to. It would also be nice to figure out which users are accessing
    a given application.
    We are running AS 9.0.4.2 with ORASSO database 9.0.1.5.
    Can you identify which tables I will need to use to satisfy my requirement?
    Thanks, Mike

    Thanks! I modified this slightly to get what I needed but I didn't think that I could get this from dba_tab_privs. You were a huge help!
    select table_name, grantee
    from dba_tab_privs
    where
    table_name in ('UTL_FILE', 'UTL_TCP', 'UTL_HTTP', 'UTL_SMTP', 'DBMS_LOB', 'DBMS_SYS_SQL', 'DBMS_JOB', 'DBMS_BACKUP_RESTORE')
    and privilege='EXECUTE'
    order by table_name;

  • List of users who have access to a specific universe

    Hello Experts,
    We have a requirement to get the list of the users who have access to a specific universe. Please suggest how to achieve this ?
    Is there any query to find this list by query builder or query to audit database ?
    We are using Business objects 3.1 sp5.
    Many Thanks
    Ankur

    Ankur,
    Refer to the discussion below:
    how to get a list of reports a user has access to, using either the cms database or the auditing database
    Regards,
    Ashvin

  • Portlet to display all users that have manager defined as currently displayed user profile

    I need to create a portlet such that when a user finds a user's profile they see all of the users defined with manager set to the value of the profile user's employeeNumber.
    Example:
    (Think a directory of employees)
    John searches and finds user named Jack. He sees Jack's name, phone number, address, etc in the General Information section. Then he also sees a section (Portlet) that lists all of Jack's direct reports. John clicks on one of Jack's direct reports (Sam), to find this person's phone number.
    The Direct Reports portlet would be a search portlet that finds all of the users that have a mangerID property set to the value of Jack's employeeNumber property and displays them sorted by LastName.
    I need some direction on where to start for this.
    It seems like I need to use the Plumtree Server API in order to search for all of the user objects and sort them on a particular property, .e.g IPTObjectManager.Query Method (Int32, Int32, Int32, Int32, Int32, Object[][])
    A crawler seems out because, I guess that would require creating a folder for every user in the system? If I create a single folder I would need a binary tree structure to the folder. (Has anybody done this?)
    I am concerned about the performance related to performing this search each time a user examines a user's profile.
    Can somebody direct me to an example of a search "Portlet"? All of the examples I see are of searching external information like Google, or use PRC (do not see how that would be implemented in a portlet), or use EDK (external and does not seem to be able to do this).

    You don't need one workflow per user when a filtered view can do this for you.  If the manager's list is the parent calendar, I'm assuming that he'll be at least using the person look-up column.
    Whether this feeds through the MyCalendar or stays where it is, you can use the [Me] parameter within the filter on a new view.  This will then return the assigned holiday filtering against the account that is logged in.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required

    We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required to install. The apps have already been installed. The users cannot run them unless they are in the local admin group.Using "Run as admin" does not work. It gives the same error.
    I have opened a case with adobe support and was basically told to suck it up and put the users in the admin group. Actually, what was said was that it is "mandated that the users have administrative rights". 
    There are a couple of things wrong with this. It was working for both users until recently - a recent required creative cloud update. The users have never been local admins yet the apps were working (poorly, but working).
    We are in an enterprise environment and users simply do not have administrative rights on the computers.
    I have changed permissions on all adobe folders, granting users or authenticated users modify or full control rights, did the same in whatever Adobe registry HKLM keys I could find. Nothing has allowed the users to run the apps - unless they are put in the local admin group.
    Someone has to have a fix for this. Adobe apps have proved to have far too many vunerabilities to even entertain the idea of elevating user rights. I can't imagine that enterprise environments are allowing this.
    Any help or suggestions are greatly appreciated.

    Jeff,
    Thank you for your response. The users in question are "standard" domain users. We do not reduce users permissions below the standard level.
    The apps do not load with their current standard user permissions.
    The thing that makes this odd, is that up until recently they did this issue with cloud apps. The only way I can make it work for them now is to put them in the local administrator group on their pc's - which is not going to happen.
    This is what they now see. As I said before, this was not a problem up until recently they would see all their available apps. If I put them in the local admin group the apps are listed without having to install. Everything is there, just not accessible to the user.

  • I have a requirement where I have to give the list of users who can access a specific computer. I am new with PS. Do you have a script to list users that can access a computer object of AD ?

    I have a requirement where I have to give the list of users who can access a specific computer define in AD.
    I am new with PS.
    Do you have a script to list users that can access a computer object of AD ?
    I have executed the following script  but it does not give me the access rights of who can access the computer 'computername'
    How can i have this information. please help
    Import-Module activedirectory
    $computer=get-adcomputer "computername" -properties ntSecurityDescriptor
    $omputer.ntsecurityDescriptor.Access | select-object -expandproperty IdentityReference | sort-object -unique

    I would say that, since the OP has so little info, there are no policies in use.  It there were then this question would never be asked the way it is being asked.
    I had a client call with a letter from their insurance company; an accountant with malpractice insurance.  THey asked the same question inmuch the same way.  "What computer can you users access?"  The question should be more like
    "Do you have a policy that restricts access to computers and do you audit for compliance?"
    I have had other clients whose insurance asked the question in that way.  It produces a better view of what should be happening and how to show compliance.
    I recommend that companies being asked these questions by their legal departments or insurance companies should contract with a god computer security consultant to assist with answering these very tricky questions.  Of course if it is just you boss's
    curiosity  then you may need to discuss his requirements with him in more depth.
    ¯\_(ツ)_/¯

  • We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    We have multiple users, each with multiple devices, on 1 apple id - as we want to share music and ibooks etc.  We want the children to have access to the store, but with a financial limit. How do we do this?

    Welcome to the Apple Community.
    That's simply not possible I'm afraid. You'd need to give them their own account and allowance or make it so you are required to be there to input the password when they wish to make a purchase.

  • Saving so that windows user can have access?

    I have my project all ready and those with quick time...loads up perfectly. However those who have windows have a long wait or pile will not come up. Do you know how i can save my final cut express project so that window users can have access to it?

    thank you. one last question....the quick time movie file can not be seen when opening on a windows. do you know if i need a quick time pro so that i can convert it? or is there a way that i don't know about?

  • Data view web part to display the most frequently accessed pages based on the user that is logged in

    I am working on a project in which I would like to display the top 5 most accessed pieces of content as links, based on the user that is logged in. Our MOSS 2007 implementation has subsites for all regions that we do business in, as an example North, South, East, and West. When a user visits the North region homepage, I would like a web part to display:
    Hello, <username>, here is a listing of your most accessed content:
    Link to One
    Link to Two
    Link to Three
    Link to Four
    Link to Five
    So each user would get a customized list based on their content access. We are not using my sites, but these would not work as we want the list to display on the home page of the region site.
    I am thinking that a data view may work here, but I am not sure. Any help is greatly appreciated.

    If you are running MOSS you may want to take a look at the Relevant Documents web part too.
    http://office.microsoft.com/en-us/sharepointserver/HA102410251033.aspx
    The Relevant Documents Web Part helps you create a personalized view of the documents that you create, check out, and change. In a large Document Center, the Web Part can save you time and effort by making files easier to find and use. The following figure shows the Web Part:

  • HT5621 i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    i buy a second hand IPAD and after restoring is shows the previous user apple ID and even i dont know the person that have the ID and now i want to use with my apple ID

    Without the previous owner's Apple ID and Password, you will not be able to activate the iPad.

Maybe you are looking for

  • Contingencia: numeraçao parada no monitor!

    Boa tarde gente! Estou testando o scenario da contingencia depois de implantar SP34 no SAP 4.7 e preparando tudo para a NFE V2.0. Activé a contingencia para um local de negocio e crié uma nota. Mas a nota no monitor fica sem numero e sem ser identifi

  • How do you check to see if the firewall is up?

    Hi, I need to disable my router's firewall but I don' want to expose the office computers to any untold risks. All the computer's are connected to the internet either wirelessly thanks to the Airport Extreme, or via a wired connection (modem/router -

  • Windows 8.1 Pro not booting after install of Hyper V - ASUS z87 + intel 4670K

    Hi, I am running windows 8.1 pro on a intel 4670K 4th Gen Haswell CPU and ASUS z87 plus motherboard. 16gb of kingston hyperx ddr1600 memory. I have enabled virtualisation technology in the bios.  CPU has SLAT.... or Extended Page Table, as intel like

  • S-video to cat5 not working

    My recent setup was from video card that has DVI and s-video. So I ran the s-video into a Balun that had a cat5 cable exit into the ethernet  wall port that ran to the the box with cat5s running to the IDF that in turn ran to the two tvs. What I woul

  • Throws Exception

    Dear Expert, May I know how to throw Exception from a thread back to calling program ? As I always get the following message when compiling the code cannot override run() in java.lang.Thread; overridden method does not throw java.lang.Exception publi