Get-Acl where username has access to folders and SubFolders

Hi, I have a script that works only on the path that is defined, but in my environment I have this path with plenty of subfolders underneath this path. How do I get the ACL permission of the user in the SubfolderS?
$Path = Get-Acl -filter * -path \\ServerName\Shared\
$Path.Access | where {$_.IdentityReference -like "DomainName\UserName"} | Select-Object FileSystemRights, AccessControlType, IdentityReference, IsInherited | ft -auto
Thanks,

Hello,
Tried this, it gives a result, but also at the end it gives an error;
Get-Acl \\ServerName\Shared\* | select -ExpandProperty Access | where {$_.IdentityReference -like "DomainName
\Username"}
FileSystemRights : Write, ReadAndExecute, Synchronize
AccessControlType : Allow
IdentityReference : Domain\Username
IsInherited : False
InheritanceFlags : ContainerInherit, ObjectInherit
PropagationFlags : None
Get-Acl : Attempted to perform an unauthorized operation.
At line:1 char:8
+ Get-Acl <<<< \\ServerName\Shared\* | select -ExpandProperty Access | where {$_.IdentityReference -like "Domain\Username
+ CategoryInfo : NotSpecified: (:) [Get-Acl], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetAclCommand
PS D:\Scripts>

Similar Messages

  • Authorized device was erased. Downloaded iTunes. Says my iPod is already synced to a library. Where do I access that library and how do i get it back on iTunes? I tried manually move songs in disk mode. Bunch of data on ipod, how to remove?

    One of my authorized devices was erased. I downloaded iTunes. Says my iPod is already synced to a library. It will allow me transfer purchased songs but not songs I had that were downloaded off of my CD's. Where do I access that library and how do i get it back on iTunes? I tried manually move songs in disk mode. Now I have a bunch of data on ipod and I don't know how to remove it. It basically copied all my itunes files from my C drive onto ipod in my efforts to move the library. 

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • How to get the Folders and subfolders collection in Project Manager

    Hi,
    I am trying to get the folders and subfolders collection in Project Manager, so that I will be able to loop through the collection and be able to create a project under the appropriate folder.
    Any suggestions?
    Thanks.
    Bhanu

    Anything you do without submitting to form has to be done on the client side (ususally by JavaScript) using data which has been send already from the server.
    With JavaScript you can do quite a bit. You can download tables which don't necessarilly appear on the screen, loading them into JavaScript arrays by dynamically generating javascript. Then you can pick up events like drop-box selection and use these tables to chose what you do next (e.g. preloading other fields, setting drop box content etc.).
    Or, you can cause forms to be submitted when actions like a selection happen without the user clicking a button. It's generally a matter of how much data you'd need to transmit.
    Another posibility is to use a Java applet, which can generate requests to the server and handle the results as it chooses. That are a number of problems with that but occasionally it's the best solution.
    What you can't do is to handle user input inside a JSP. The JSP has come and gone before the user even gets to see your form.

  • I get the message 'itunes has encountered a problem and needs to close' when trying to open itunes 11.1.1.11. I have had to uninstall itunes so that I could load this version, the PC says it is correctly loaded, but I now cannot open itunes. Advice?

    I get the message 'itunes has encountered a problem and needs to close' when trying to open itunes 11.1.1.11. I had to uninstall itunes so that I could load this version as the update to version 11 kept failing. The PC says 11.1.1.11 is correctly loaded, but I now cannot open itunes. Any advice on how to get itunes working again?

    Hello there, ytnoj.
    Uninstalling and reinstalling iTunes can be a tricky endeavor and must be done in a very specific way. The following Knowledge Base article provides the step-by-step of the process:
    Removing and Reinstalling iTunes and other software components for Windows XP
    https://support.apple.com/kb/HT1925
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • I purchased a new Lab top and try to install my CS4 software again. I get this message:Setup has encounter an error and cannot continue.

    I purchased a new Lab top and try to install my CS4 software again. I get this message:Setup has encounter an error and cannot continue

    Have a look at this: Re: CS4 Installation on Windows 8.1 Setup error
    Basically install CS4 from a new Admin account.
    Gene

  • HT201068 In the Ap Store "Updates" window, it says that "Remote Desktop Client Update" was installed today.  I never intentionally installed "Remote Desktop".  How did it get there, Where is it on my computer, and How can I remove it?  Thank You!

    In the Ap Store "Updates" window, it says that "Remote Desktop Client Update" was installed today.  I never intentionally installed "Remote Desktop".  How did it get there, Where is it on my computer, and How can I remove it?  Thank You!

    I don't know if you have been there, but a very suspicious icon!  (Like this one on a NSA satellite: http://b-i.forbesimg.com/kashmirhill/files/2013/12/Satellite-logo-for-spying.jpg)  Yikes!
    Are they after the French too?!?  I thought we were allies?!?  Wait a minute . . . I'm an American citizen with the Constitutional Right (which they vowed to uphold when they took their job!) of privacy!!!
    What do you think of all this?
    How did you find it in the OS?
    Do I just trash it with "Secure Empty"?

  • Copying folders and Subfolders with files using Promises WinJS

    Hi,
    I have app written in WinJS.
    I want to copy a particular folder along with its subfolders and their files. I am so far successful with copying folders. Below is the code for the same.
    app.CopyFolder = function (folder, destFolder) {
    var replace = Windows.Storage.CreationCollisionOption.replaceExisting;
    //console.log("create folder: " + folder.name);
    return destFolder.createFolderAsync(folder.name, replace).then(function (newdest) {
    return app.CopySubFolders(folder, newdest);
    app.CopySubFolders=function(folder, destFolder) {
    return folder.getFoldersAsync().then(function (folderlist) {
    return WinJS.Promise.join(folderlist.map(function (folder) {
    return app.CopyFolder(folder, destFolder);
    Now after I have copied all the folders I need to copy their respective files. The problem is I am stuck,I get the files copied but I want to proceed ahead after all the files are written to their respective folders. Below is the code for the same.
    app.copyAllFiles = function (fileList, destStorFolder) {
    console.log('copyFiles Start...');
    var promises = [];
    var fileCopied = 0;
    var collideOpt = Windows.Storage.CreationCollisionOption.replaceExisting;
    return WinJS.Promise.join(fileList.map(function (file) {
    return app.copySingleFile(file, destStorFolder);
    app.copySingleFile = function (fileObject, destFolder) {
    var promises = [];
    var fileCopied = 0;
    var path = destFolder.path + "\\" + fileObject.folderName;
    var collideOpt = Windows.Storage.CreationCollisionOption.replaceExisting;
    return Windows.Storage.StorageFolder.getFolderFromPathAsync(path).done(function (folderObjectOfLocalFolder) {
    return fileObject.fileObject.copyAsync(folderObjectOfLocalFolder, fileObject.fileName, collideOpt).then(function (fileObject) {
    console.log("copied single file:" + fileObject.name);
    The problem is when i run the folder copy code and apply breakpoint for the success call back of 
    CopySubFolders(source,destination).done(/*my breakpoint*/)
    The folders are created.
    But when I try to breakpoint for my copyAllFiles,the files are created only when i pass the success call back.
    Can anyone tell me what am i doing wrong? How can I proceed ahead only when all the files are written successfully.
    Regards,
    Ninad 

    Hi,
    I tried the above solution but what i want is that the action of copying folders and subfolders along with the files should be done with promises and that promise should return only when all folders,sunfolders and their files have been copied. I want to
    do it in this way because I want to perform certain second action only when all things are copied.
    If I do it the as per the link the function runs in the background and my second action proceed aheads and may cause error if it finds some folder or file missing.
    So I came up with following above code,first copy folders then copy. The copy folder works as expected but the files are getting copied only when the file copying code enters the success call back.
    Can you please shed light on my code where I am going wrong.
    Or is it ok to proceed ahead with the solution you mentioned at the link cause I dont want any runtime crashes.
    Regards,
    Ninad

  • List all folders, and subfolders, in a directory

    I'm trying to find a way to list all folders, and subfolders, in a directory.  I ran the code below and got a message that says 'Access is Denied'.  There is no way access is denied to that folder. How can I list all folders, and subfolders, in
    a directory?
    --'C:\Users\Ryan\Desktop\Coding\';
    set nocount on
    declare @curdir nvarchar(400)
    declare @line varchar(400)
    declare @command varchar(400)
    declare @counter int
    If (select count (*) from sys.objects where name='Output') <> 0 DROP TABLE output
    If (select count (*) from tempdb.sys.objects where name like '%#Tempoutput%') <> 0 DROP TABLE #Tempoutput  
    If (select count (*) from tempdb.sys.objects where name like '%#dirs%') <> 0 DROP TABLE #dirs  
    create table #dirs (DIRID int identity(1,1), directory varchar(400))
      Set @command = 'dir "C:\Users\Ryan\Desktop\Coding\Microsoft Access\" /S/O/B/A:D'
     insert into #dirs exec xp_cmdshell @command
      set @counter = (select count(*) from #dirs)
    create table #tempoutput (line varchar(400))
    create table output (Directory varchar(400), FileSize varchar(400))
        While @Counter <> 0
          Begin
            Declare @filesize int
            set @curdir = (select directory from #dirs where DIRID = @counter)
            set @command = 'dir "' + @curdir +'"'
            insert into #tempoutput
            exec master.dbo.xp_cmdshell @command
               select @line = ltrim(replace(substring(line, charindex(')', line)+1,len(line)), ',', ''))
               from #tempoutput where line like '%File(s)%bytes'
               Set @filesize  = Replace(@line, ' bytes', '')
            Insert into output (directory, Filesize) values (@curdir, @filesize)
            Set @counter = @counter -1
           End
           Delete from output where Directory is null
    select * from output
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Can you tell us how you're executing this code? Is it called from sql agent job or are you executing it by calling code directly?
    Did you try creating a proxy for xp_cmdshell and then executing it?
    http://www.mssqltips.com/sqlservertip/2143/creating-a-sql-server-proxy-account-to-run-xpcmdshell/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I transfer/copy my entire iPhoto library from one iMac to another iMac whilst keeping all the folders and subfolders intact?

    We recently purchased a new iMac for our office (8 GB memory, 2.7 processor, version 10.9.2) and we need to copy the iPhoto library from our other iMac (version 10.9.4) onto the new one. The photos are essential for our work and there are around 53,000 of them all organised into folders and subfolders and then the photos are manually ordered within the albums.
    We have tried connecting the computers but when we tried to access the iPhoto library on the new iMac it says that iPhoto is locked and we do not have permission to view it. We updated iPhoto on the old iMac as we thought that might be the problem but the message still appears. We've been advised to use an external hard drive but we're worried that will corrupt the organisation of the library. We have also been told not to do it over AirDrop / the Server because of the sheer quantity of photos.
    Any advice on how to safely do this would be much appreciated.

    No idea exactly what you did
    if you followed the instructions
    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then launch iPhoto. That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.
    then you have exactly the same thin on your new system that you had on the old
    If you do something differently - like import the library instead of simply opening it - then it will not work
    did you dimply drag the iPhoto library from the pictures folder of the old machine to the pictures folder of the new machine and then launch iPhoto on the new machine?
    and to help it is important to use word correctly since that is the only communications method we have - in iPhoto folders do not contain photos - you view photos in events and you can organize them using albums (which view photos) and folders (which hold either albums or other folders - folders never have photos in them) so your description of the problem is not at all clear since it uses folders incorretly
    LN

  • HT204655 Can I create folders and subfolders in the new Photos on my mac?

    I've just started using the new Photos app in the latest Yosemite update on my Macbook Pro.
    Until recently I was using Aperture to sort all my photos into folders and subfolders - I think they were called "events" or "projects" in Aperture. 
    In Aperture, I was creating folders like "1993", "1994", "1995" or "Best of My Family".
    Then I had subfolders within those folders - things like a "Christmas 1995", and perhaps some subfolders within that like "Christmas 1995 at Home", "Christmas 1995 at Parents" as well as things like a "favorite 1995 pics".
    And sometime non-date related folders - things like "Children as Babies" subfolder or "Parents on Vacations" subfolder within the "Family" folder.  
    These folders and subfolders seem to have been carried through to this new Photos app as "iPhotos Events".
    But I dont seem to be able to continue sorting - like creating new subfolders within folders.   For example, in Photos I don't seem to be able to create an album within in an album.
    Am I missing a trick here?
    Is Photos unable to do this?
    Or, is the community please able to suggest another alternative solution - like, would using the Pictures folder in Finder be better, perhaps in conjunction with DropBox instead of iCloud?
    Or another photo organizing app that is able to sort folders and subfolders?
    Thank you for your help in advance!

    One way to create folders, subfolders, albums, is to make sure you have your Sidebar showing (menu - view > sidebar) and then use "Control + mouse click" on a folder you want to create a subfolder or album in to bring up the contextual menu.   You can also do these things in the upper right of the Photos window using the + icon but that always seemed to put those items in the top level of the sidebar so I would have to drag and drop them to the folder where I wanted them to go.
    Lori

  • Arranging Folders and Subfolders

    We are in the process of re-arranging our content into folders and subfolders, and I have heard concerns that after the users have created their folders and subfolders, that they have no way of controlling the order in which they are displayed. This is rather important to us as they want to make sure the most important folders are listed towards the top fo the list, and being that they will be continuously adding folders, it is currently impossible to meet their needs.
    Is there a way to manualy or otherwise sort folders the same way there is to re-arange items (little blue up-arrow)? Thanks in advance.

    Thanks Product Manager! That has been right under our noses all this time and we didn't even know that functionality was there. You have made our week!!

  • Search into folders and subfolders

    I must realize a procedure ColdFusione that effects the
    search into folders and subfolders
    on the file System that simulates the Windows API, specially
    the function PathMatchSpecW().
    How can I realize it?

    Thanks for the information,
    I must realize an optimistic search of folders and files.
    For example in "C:\App\" I have 3 folders Fp_1, Fp_2, Fp_3.
    Gives the run "C:\App\Fp_*" I must get the list of the 3
    folders.
    I use this code:
    <CFDIRECTORY DIRECTORY="C:\App\Fp_*"
    NAME="MyDir"
    SORT="name ASC">
    <CFTABLE QUERY="MyDir">
    <CFCOL HEADER="NAME:" TEXT="#Name#">
    <CFCOL HEADER="SIZE:" TEXT="#Size#">
    </CFTABLE>
    I have not a record!
    Can you write a correct example code?

  • Looping through folders and subfolders

    Hi,
    I'm about to create a script to check some tifs and jpgs for the right height and width, resolution and so on.
    I could get it to work if I see the files in the content panel (looping through the files by app.document.getSelection ...
    The script needs to check many files in different subfolders (all in one parent folder), so I don't like to use a collection to reveal all files of all subfolders first and then start the script.
    My plan is to choose the parent folder in the folder panel and the script should  loop through each file of each subfolder ...
    So maybe there's someone who knows a solution for this problem, it would be great!
    Thanks a lot,
    Sebastian.

    Wow,
    That was fast, I'll test it tommorow in the morning, thanks a lot so far!
    Hopefully I'll be able to get our scripts together...
    Thanks
    Sebastian
    Am 05.08.2012 um 20:13 schrieb Paul Riggott <[email protected]>:
    Re: looping through folders and subfolders
    created by Paul Riggott in Bridge Scripting - View the full discussion
    This should get you started...
    #target bridge  
    var folders =[];
    folders = FindAllFolders(Folder(app.document.presentationPath), folders);
    folders.unshift(Folder(app.document.presentationPath));
    for(var a in folders){
    var fileList = folders[a].getFiles(/\.(jpg|tif)$/i);
    for(var p in fileList){
    var thumb = new Thumbnail(fileList[p]);
    var height = thumb.core.quickMetadata.height;
    var width = thumb.core.quickMetadata.width;
    var Resolution = thumb.core.quickMetadata.xResolution;
    if(Resolution ==0) Resolution =72;
    //do your processing here
    //$.writeln(decodeURI(thumb.spec) + "," + height + "," + width + "," + Resolution);
    function FindAllFolders( srcFolderStr, destArray) {
    var fileFolderArray = Folder( srcFolderStr ).getFiles();
    for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {  
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
    return destArray;
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4599891#4599891
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4599891#4599891. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Bridge Scripting by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Closing all folders and subfolders within a window with one command

    In list view, is there a way to close all folders and subfolders within a window with one command, instead of having to close each individually?
    Thanks!

    Thanks, all, for your feedback, but no cigar, yet:
    - opening folders with "option" is possible but problematic
    - none of this solves the question of closing all the folders and subfolders within a window in one shot.
    Any better solution would be appreciated.
    Thanks!

  • Exporting of pictures with folders and subfolders from Aperture

    I was importing folders with subfolders structure to Aperture 3.
    Is possible later export my pictures from structure in Aperture to folders and subfolders with same structure like it was before importing to Aperture?
    Thanks.
    Roman

    I'm assuming you imported using managed files and not referenced files? If referenced (leaving files in place), then your files are in the same folder structure as before.

Maybe you are looking for