Getting a list of users and permission from a folder

I run this command to get a a list of users and permission from a folder
$project_folder = "\\servername\foldername"
get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType, FileSystemRights > folder.csv.
This only lists information for 1 folder.
If i have multiple folders how should the code be modified?

this is the code i am looking for 
 $project_folder
= "\\servername\foldername\foldername1"
get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
FileSystemRights > folder.csv.
I  run this code and this gives me the information for only the folder 'foldername1'.
Ex. i need a list of users who have permmission in \\servername\foldername\foldername2.
i run the code and it gives me the permissions and list of users in foldername2.
This is the issue
IF there are multiple folders \\servername\foldername\foldername2, \\servername\foldername\foldername1,
i need to run the code each time for 1 folder. 
is there a command where i can combine the path of these 2 or more folders and export
it to csv
Ex.  $project_folder
= "\\servername\foldername\foldername1",
"\\servername\foldername\foldername2"
get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
FileSystemRights > folder.csv.
This will give me the list of users and the type of access they have in foldername1 and
foldername2

Similar Messages

  • Getting a list of users and permission from a folder including nested groups

    $project_folder = "\\servername\foldername\foldername1"
    Get-Acl $project_folder | 
        ForEach-Object { 
            $_.Access | Add-Member -MemberType NoteProperty -Name Path -Value $_.Path -PassThru  
        } | 
        ft -GroupBy Path -Property IdentityReference, AccessControlType, FileSystemRights > foldertst.csv
    The above command gives me a list of all the users who have access to foldername1. (including users and groups).
    How do i modify this code to get the information of the nested groups for this folder

    Sorry, I won't be providing a complete solution, just a few suggestions and comments.
    first thing will be to determine for each ACE (access control entry) whether the IdentityReference refers to a user account or a group. If a group, you will then need to process each of its members, each of which will share the FileSystemRights of the current
    ACE.
    But... if any of the members are other groups, you will need to process them recursively as well. Recursively.
    There are a few gotcha's, though:
    you need to recognize and avoid infinite recursion when, for example, group A is a member of group B which is a member of group A. One way to do this is to keep a list of all groups encountered, processing each only once.
    if one ACE belongs to group C, another belongs to group D, group A is a member of C, and group B is a member of D, you must ensure that all members of A and B are listed with ACE C and ACE D.
    Once you have identified all user accounts you might find that some have multiple records. For example, user AA might belong to group A, and get unlimited access through the ACE owned by group C, but deny read access through the ACE owned by group D. If
    the first mention of this user in your output shows he has unlimited access, that will, of course be incorrect. at the very least the output should be sorted by username. You could attempt to amalgamate all of his various accesses (like the effective permissions
    tab) into a single one. But it would be difficult to show which group memberships contributed which aspects of his access permissions in any kind of simple or intuitive way.
    security configurations can easily become overly complex. The best solution is to simplify and standardize how permissions are applied and how groups are nested. I have had to do this on occasion, and the problem of determining how things should be permitted
    from how they actually are is probably the most complicated part of the job.
    good luck.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • Get a list of copied/moved files from a folder

    Hi everyone
    A friend of mine works in an office, and they're thinking that somebody is copying files from their Macs to flash drives or something to give the data to another company. He asked me a way to make a log of which folders/files are copied (just filename, where they copy it and time of copy). I've revised the system logs and I haven't found the way. Maybe with a folder action or something?
    Of course, this is not for bad use. It's all about a company security.
    Thanks in advance,
    Enrique

    Wow, I'll try it... but isn't that audit programme something to put inside the code of a software?
    My English isn't very good, so I feel lost in that Mac reference library...

  • Hi am having issues with getting the list of users from the Active Director

    Hi am having issues with getting the list of users from the Active Directory, can anyone help me with this!

    Hi Jason,
    Try this:
    1.  In Ultiboard select Tools>>Netlist Editor>>Pins, press the Delete button
    2.  Select all nets in the Select the Net to Delete dialog and then press the Delete button.  This will clear all nets in the layout, don't worry all traces, parts are still on the design.
    3.  Go to Multisim and select Transfer>>Forward annotate to Ultiboard.    This will add all nets that you removed back and it should fix the pin problem
    Tien P.
    National Instruments

  • HT1600 I have an Apple TV 2nd Gen, iPad 2 and can't get the icon to appear when i swipe from left to right. What am I missing? I am able to get the 'Home sharing' 'user and password on my Mac.

    I have an Apple TV 2nd Gen, iPad 2 and can't get the icon to appear when i swipe from left to right. What am I missing?
    I am able to get the 'Home sharing' 'user and password on my Mac.
    Also using IPad 2 I am able to get the ITunes to accept the user name and same password as the Mac.
    However, the only way I can see the 'Home sharing; icon is in Music on the Ipad. When I tap on the Icon it asks for a password.
    When I give the same password, it is rejected.
    Help!!!!
    Jaxxdiggs

    Personally I think the iOS devices are poor at reconnecting  - Airplay establishes that a link is available but when the iPhone/iPad has been away from the house and rejoins the network i think AppleTV already thinks it's connected with a different IP address and fails to recognise it has joined the network again with new credentials.
    Something along those lines anyway.
    I find that a combination of restarting AppleTV, router and iOS device tends to fix it, but not for everyone.
    AC

  • Is there any way to get the list of Essbase and planning users  in excel wi

    Is there any way to get the list of Essbase and planning users in excel with last login details.

    Hi,
    This tool might be of some help to you, 'OlapUnderground Advanced Security Manager'. I havent used it personally but went through its features. Give it a try!
    Thanks,
    Junaid

  • Can we track or get the list of sites and subnets deleted from ActiveDirectory?

    Can we track or get the list of sites and subnets deleted from Active Directory?

    Are you looking of the previous history? If you have saved all the event log and auditing is enabled, you can go back and search. 
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • How to get a list of user who is shared with particular workbook

    Hi everyone,
    I have duplicated a workbook and made some changes on the new one. Now I'd like to share the new one with the same list of user as the old one.
    The number of user is great, more than 500.
    I would like to know any SQL that let me get a list of user who have been shared with the old one, such that I won't miss anyone of them.

    Hi,
    I would like to know any SQL that let me get a list of user who have been shared with the old one, such that I won't miss anyone of them.Refer to these documents.
    Note: 293021.1 - How to Find Out the Sharing Information for Discoverer workbooks From the Database
    Note: 375777.1 - How To See Which Discoverer Workbooks Are Owned And Shared By An Existing Or Dropped Database User
    Thanks,
    Hussein

  • How do I get a list of users for a specific role in EP 6.0

    Hi,
    I'm trying to find a table or an API that I can use to get a list of users for a role that I have created in the portal. There are about 940 users tied to this role that I would like to dump to an excel or text file. My goal is to get these users into a security group and tie the role to the group instead of each user. Thanks!

    Hi Chris,
    first, welcome on SDN!
    UMFactory.getInstance().getRoleFactory(roleID).getUserMembers() returns the users which are members of the role, see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/ume/com/sap/security/api/IRole.html
    addGroupMember(...) adds a group.
    removeUserMember(...) removes a user from a role.
    Corresponding method exist for the groups.
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!
    PPS: Wrong forum, should have been EP DEV for example. It's not a question in conjunction with KM.

  • How do i get a list of users

    How do i get a list of user out of OID and into portal 9.0.2 using a plsql portlet
    I want to create a list of users as portlet and display their details.
    any help
    cheers

    You need to use dbms_ldap. And only it. SELECT * from wwsec_person$ is not apply to 9.0.2 release.
    The sample you can find at Oracle Internet Directory Application Developers Guide Release 3.0.1 or later.

  • By API action, how can I get the list of user IDs within a specific group  (which is created by API) ?

    By API action, how can I get the list of user IDs within a
    specific group (which is created by API) ?
    or How can I get the group (which is I create by API) ID to
    which a specific user belong by API action?
    Thanks
    Alex

    The poster already posted at the Acrobat Users Community, Interactive Forms that sums up a client order from catalog. The sample form posted to Acrobat.com was a revision of the sample form that came with Acrobat 4.0. There are some fairly advance scripts, templates, and document level functions involved with this form.

  • List of Users and Roles Assigned in Portal (producer & consumer)

    Hi
    We are running federated portal EP 7.0 EHP1 SPS07, we need to pull the list of users and their roles assigned from tables or thru report in our federated portal, so that we can have a consolidated list of users and their roles in both producer and consumer portal
    Thanks
    Senthil

    Hi Senthil,
    Use report RSUSR002 to get list of roles for the users.
    Regards,
    Marasa.

  • Get a list of users logged on each server node in a clustered environment

    Hi,
    does anybody know if there is way to get a list of users which are logged on each server node in a clustered environment. Or maybe is there api for that so I could write an application which does that?
    Regards
    Ladislav

    Hi,
    about the code I was looking at - easily you can find out that these iviews are components of <b>com.sap.portal.admin.monitor.par</b>. The thread Thread Overview is implemented by: <i>com.sapportals.portal.admin.psm.PortalServerMonitor</i>. In <i>getThreadsData</i> method there is a parameter <b>portalMonitor</b> so it led me to this code in <i>doContent</i>:
    /* 143*/          IPortalMonitor portalMonitor = (IPortalMonitor)PortalRuntime.getRuntimeResources().getService("com.sap.portal.runtime.application.monitor.PortalMonitor");
    /* 144*/          IPSMData psmData = portalMonitor.getIPSMDataInstance();
    So I have found <i>com.sap.portal.runtime.application.monitor.par</i> and there is a service implemented by <i>com.sapportals.portal.prt.service.monitor.PortalMonitor</i> where is <i>com.sapportals.portal.prt.service.monitor.MonitorCommunication</i>. And this is a service which calls all the nodes in the cluster around asking for info about the threads, requests, ... Here is a method <i>getMonitoringData</i> which works with object <i>com.sapportals.portal.prt.service.monitor.MonitorData</i>. Here in method <i>getThreadOverview</i>:
    /* 396*/          ApplThreadOverview oATOs[] = OverviewMonitor.getApplThreads();
    So in this <i>OverviewMonitor</i> the method <i>getApplThreads</i>:
                 public static ApplThreadOverview[] getApplThreads()
    /*  50*/          return ApplThreadMonitor.getApplThreads(false);
    from here:
    /* 130*/          ApplThreadMonitor hlpAppl = TaskMonitor.getApplThreadList();
    and this <i>ApplThreadMonitor</i> has:
                 private String userName;
                 private String reqName;
                 private String taskName;
                 private String compName;
                 private String action;
    So if you can get this (when the most of the classes mentioned is not in API but CORE part) on each node and ask for it from one place you got the user list at cluster nodes...
    In fact there can be a shortcut to get this info, I have found this ;o)
    Romano
    PS: and thanks for the stars!

  • How to find out list of users and their access on Sharepoint

    Hello Everyone
    How can i find out list of users and what access they have on SharePoint site? I want to create table with list of the users and their access?
    Thanks

    you can get the report using below powershell scripts. first one gives list of users in a site collection level.
    The second link generates the permissions reports for each user.
    http://techtrainingnotes.blogspot.com/2010/12/sharepoint-powershell-script-to-list.html
    https://sp2010userperm.codeplex.com/
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

Maybe you are looking for