Get-ACL error message.

Hi all,
   I have been writing minor PS scripts for a couple of weeks now and have slowly increasing my knowledge. I have written the following script and what it is supposed to do is as follows:
List's the child items of the folder that is input in a command. It then outputs it in a Gridview to allow for the specific subfolder to be chosen, and at that point, I am looking to have it list the permissions of that selected folder in a CSV file.
My issue is that after selecting the folder in the Gridview pane, I am getting the following error: 
Get-Acl : Cannot find path 'Projects' because it does not exist.
At I:\Administration\Scripts\Get Folder PermissionsV1.ps1:9 char:32
+                                            Get-Acl | Format-List | export-csv c:\Permissions ...
+                                            ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-Acl], ItemNotFoundException
    + FullyQualifiedErrorId : GetAcl_PathNotFound_Exception,Microsoft.PowerShell.Commands.GetAclCommand
The code is listed here as well. I've looked up this error, but not quite sure of the direction to head.
$server = read-host "Enter the name of the server you want information about."
$folder = read-host "Enter the folder you want information about."
Write-Host "Please be patient as the file will take some time to populate."
Get-ChildItem "\\$server\$folder" -Filter * |
where {$_.PsIsContainer} |
Select -ExpandProperty Name |
Sort |
Out-GridView -PassThru |
Get-Acl | Format-List | export-csv c:\Permissions.csv -NoTypeInformation
Invoke-item c:\Permissions.csv

It is only necessary to pass the object to Get-Acl.  Remember that PowerShell is an object system.
Get-ChildItem \\$server\$folder
-Directory |
     Out-GridView
-PassThru |
     get-acl
This works as expected.
You cannot export the output of Format-List in any meaningful way.  You can output it as text.
¯\_(ツ)_/¯
Yes, but the Format-List is not what's causing the error. 
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Similar Messages

  • Every time I download anything I get an error message stating ...could not open ....dmg because it is either not a supported file type or the file has been damaged." What do I need to do to fix this problem?

    For the last month or so, every time I download anything I get an error message stating "........could not open ...... .dmg because it is either not a supported file type or because the file has been damaged...." I do not know what to do to fix this issue. Any ideas?

    hmmm.... try this
    basic troubleshooting:
    Repair Disk Permissions http://support.apple.com/kb/PH5821
    Repair Disk http://support.apple.com/kb/ht1782
    reset ACLs http://osxdaily.com/2011/11/15/repair-user-permissions-in-mac-os-x-lion/

  • Why am I getting this error message when I try to open a photo in Preview?

    I am getting the following message when I try to open a photo in Preview. I have searched for possible solutions and nothing works for me. I have always used Preview to edit photos.

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • I have safari 7.0.2 and OS 10.9.4, everytime I try to install a safari extension such as, Pocket, I get an error message that says, Cannot install extension, I get this with every one of them. Does anyone else have this problem?

    I have Safari 7.0.6 and OS 10.9.4. I cannot install any extensions. Everytime I select install I get an error message, "Cannot instal extension" Does anyone else have this problem?
    Thanks Steve

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

  • I want to Sync my iPhone 4 to iTunes however I get an error message from iTunes each time I connect the phone to the PC saying that I should restore to factory settings. Frustrating because it's already annoying enough that I can't drag and drop mp3's!!!

    I have never been so frustrated before in my life with any phone. I find it obnoxious as it is that I cannot simply drag and drop files (especially MP3's) straight from my PC directly into my phone, which I have been used to doing up until now. Everyone who convinced me to get the iPhone has instructed me that my frustration can be fixed by downloading iTunes and syncing it all up via that program (which I have never used before). So, I downloaded the program successfully, however when I connect the iPhone 4 to the PC and iTunes is open, I get an error message that 'iTunes cannot read the content of the iPhone "iPhone" and that I should go to the Preferences tab of the iPhone and select 'restore' to restore this phone to factory settings. First of all, I don't understand why I need to do that. I have already downloaded apps and other important things in the 2 days that I have the phone. I am also scared that it will erase my contacts. This is such a headache. Music is very imporatant to me, but I am getting so frustrated that I don't have freedom over the phone which I thought was supposed to be one of the best out there. I would really appreciate help in this matter. I am sure the phone is great but I am on the verge of taking it back and getting something else.

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • I am trying to open my iTunes on a Windows XP laptop and get the error message 42404 "iTunes application could not be opened.  Please repair or reinstall QuickTime".  I did that and it did not help.  Any ideas?

    I am trying to open my iTunes on a Windows XP laptop and get the error message 42404 "iTunes application could not be opened.  Please repair or reinstall QuickTime".  I did that and it did not help.  Any ideas?

    Let's see if a more rigorous uninstall/reinstall procedure gets us past that, nancy. See the following troubleshooting document:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • When I click on any of my movie or TV shows in Itunes I immediately get an error message that says Itunes has stopped working and closes the program. I can sync the movies and shows to my phone okay but I can't watch on Itunes. Can anyone help?

    When I click on any of my movie or TV shows in Itunes I immediately get an error message that says Itunes has stopped working and closes the program. I can sync the movies and shows to my phone okay but I can't watch on Itunes. Can anyone help?

    Let's try the following user tip with that one:
    iTunes for Windows 10.7.0.21: "iTunes has stopped working" error messages when playing videos, video podcasts, movies and TV shows

  • In iCal - I keep getting the error message " This calendar was created by Mail" and it will not accept any input; why..??

    In iCal - I keep getting the error message “ This calendar was created by Mail” and it will not accept any input; why..??

    use Disk Utility and Verify Permisions then fix and Verify Disk and fix, this should fix it.

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any

    My LR 4 suddenly no longer recognized my memory cards. I am using the same cards and cameras but consisitently get the error message:"files not imported because the files could not be read. they are jpg and nef files...I am stuck without my workhorse! Any advice is helpful. This has never happened in 6 years

    answered in your other thread LR 4 suddenly no longer recognizes files.

  • I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.

    I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.  Thanks

    sandyzotz wrote:
    Other wise, I probably best return for a refund and get a Samsung.
    Unlikely.  Based on the complete lack of detail of the issue provided it is entirely possible the same issue would occur.
    Unless and until the user provides some actual details of the problem, there is nothing the indicate that the issue is with the iPhone.

  • I have downloaded a movie from ITunes.  It shows up in my video app.  When I go to play it I get an error message: "The requested URL was not found on this server". When I checked back on iTunes, where you click to rent or buy a movie it says "Downloaded"

    I have downloaded a movie from ITunes.  It shows up in my video app.  When I go to play it I get an error message: "The requested URL was not found on this server". When I checked back on iTunes, where you click to rent or buy a movie it says "Downloaded".  Any advice on what I can do in order to watch this movie that I rented a couple of weeks ago?

    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.

  • I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed.Help

    I have an olde iMac that once I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed. Please advise as to what could be the problem. How to fix. Thanks

    Try resetting the SMC and PRAM first, if that doesn't help try a cleaning disc.....and then buy an inexpensive external burner. Slimline super drive failures are all too common.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • What is it about InDesign CS5 that someone would get this error message?

    Hi,
    What is is about the .swf file that is generated from the InDesign CS5 interactive workspace that someone would get the following error message when they go to view the site I created?
    "This file may contain newer information that this viewer can support. It may not open or display correctly. Adobe suggests that you upgrade to the latest versions of our Acrobat products blah blah blah."
    The site doesn't seem to work for four Mac users, but works fine for at least one PC user.
    I'm trying to figure out how to save the .swf file down to Flash Player 9, which I've done by exporting a .fla file, then adjusting the Publish setting in Flash CS5. But that throws a wrench into the works...all the animations go haywire by continuously looping and the scale of all the text elements on the first page is much larger than it should be.
    Thanks, Steve

    John Black3 wrote:
    Many of my songs in my iTunes Library no longer play.  I get this error message: "The song xxx could not be used because the original file could not be found. Would you like to locate it?
    this usually happens when a user moves or deletes files in the finder - a sure way to upset iTunes.
    did you move or delete files in the finder ?
    I cannot locate the song.
    if you let iTunes manage your library, all your content will be in <MacintoshHD>/users/<yourname>/music/iTunes/iTunes music (or media)/music. did you look there ? tried a spotlight search ?
    if the files are really gone, and have been purchased from the iTunes store, see Downloading past purchases from the App Store, iBookstore, and iTunes Store.

  • Keep getting the error message when trying to sign in to iMessage on Macbook Air

    Hi all,
    I keep getting this error message " could not sign into iMessage. This account is blocked from registering " .....how do i unblock it so i can use iMessage on my mac. plz Help !

    After looking at some other posts I signed into iTunes and edited my password with my Mac. Then I powered off and restarted my iPad and all is good now.

Maybe you are looking for

  • Lost 3rd Party Apps After iOS 5.1.1 Update.

    I updated my wife's iPhone 3GS from iOS 3.something to iOS V5.1.1. This device had never been connected to the computer I used. I download iTunes, authorized the iPhone, downloaded iOS, did a backup (by right clicking on Device). I think most, if not

  • Movie and audio not synchronized in the swf file.

    Hello, I have a main movie that call and display movies from the library. In each of those library's movies i have an animation on a layer and a sound (about 15 secondes) on another layer which i want synchronize. When i check each movie on my .fla d

  • Resubmitting the fault messages from ESB Portal

    Hi, We are facing some changes in Resubmission process in ESB Portal. When we try to resubmit the fault message in ESB Portal we are getting the error and there is nothing available in the event viewer The resubmission failed: 500 - InternalServerErr

  • Sending messages from iTunes

    Hi Is there a way you can send a message from your iPhone using your keyboard to write it, an app you can download, a plug-in for iTunes or something like that. -Stian

  • Boot up options (other than internal/external hard-drives)

    Hello, Here's a strange thought/question: does anyone know if I can use a 32-gigabyte SD card and/or 32-gigabyte USB drive to boot up a Mac (with OS, tools, documents, applications, etc.)? What devices can I use to boot up a MacBook Pro? Thanks! Reas