title: Get-Acl Invalid Name
body: <p>I am using PowerShell 7 that way I can get pass the 260 Character Limit on the 2008 R2 Server we are using for shared folders/files.</p>
  
  <p><strong>Code</strong></p>
  
  <p>$root = <em>the targeted starting directory</em></p>
  
  <pre><code>$folderlist = Get-ChildItem -Path $root -Directory -Recurse
  
  $permissionslist = @()
  ForEach ($folder in $folderlist) {
      $AllAcl = Get-ACL -Path $($folder.Fullname)
  </code></pre>
  
  <p>Running the below code and getting </p>
  
  <pre><code>Get-Acl: C:\scripts\script.ps1
  Line |
    17 |      $AllAcl = Get-ACL $folder.Fullname
       |                ~~~~~~~~~~~~~~~~~~~~~~~~
       | Invalid name. (Parameter 'name')
  </code></pre>
  
  <p>Any ideas on where to look?  I am able to get to the folder, I have permissions to access the folder with the account I am using.</p>
  
  <p>Adjusted the code with a try catch and Start-Transcript this is what happened</p>
  
  <p>$root = <em>L:\Depts\AdminFinance\Campus Planning\PR-00 Small Projects folders with no numbers\Completed small projects</em></p>
  
  <p>The Folders That are giving me problems are as follows, I checked permissions and owner.  The own is S-1-15... however the folder above the problem folder is same owner of S-1-15... I do not believe that is the problem.</p>
  
  <pre><code>PS TerminatingError(Get-Acl): "Invalid name. (Parameter 'name')"
  
  $root\Bldg 50 Fuel Cell Lab Complete\0900 - Accounting &amp; Administration\0900.40 All Other Proposals &amp; Invoices\0900.40.4 Fees - Advertising, Permit, Fire Marshal
  
  $root\Bldg 50 Fuel Cell Lab Complete\1000 - Monthly Report, Lg Documents, Visuals, Etc\1050.00 Professional Services Selection Process\1050.20 Construction Mgmt Services
  
  $root\Fine Arts Print Making Studio (PR004)\0900 - Accounting &amp; Administration\900.40 All Other Proposals &amp; Invoices\900.40.4 Advertising-Permits-Fire Marshal Fees
  
  $root\TV Studio Relocation bldg 14D Complete\0200.00 - Architect, subconsultant\0200.10 Architect (Subconsult) - Contract &amp; Insurance, Notice to Proceed\0200.10.1 Contract Changes (ASAs)
  
  $root\TV Studio Relocation bldg 14D Complete\0900 - Accounting &amp; Administration\0900.40 All Other Proposals &amp; Invoices\0900.40.3 Other Communications - Voice, Data, Etc
  
  $root\TV Studio Relocation bldg 14D Complete\0900 - Accounting &amp; Administration\0900.40 All Other Proposals &amp; Invoices\0900.40.4 Fees - Advertising, Permit, Fire Marshal
  
  $root\TV Studio Relocation bldg 14D Complete\1000 - Monthly Reports, Lg Documents, Visuals, Etc\1000.40 Shop Drawings (Sample Submittals) &amp; UNF Review Comments
  
  </code></pre>
  
  <p>I am output the following info to a CSV File</p>
  
  <pre><code>"Path_Length" - "271"
  
  "Target" - "Local\Domain Admins"
  
  "Permission Level" - "FullControl"
  
  "Path" - "$root\Bldg 50 Fuel Cell Lab Complete\1000 - Monthly Report, Lg Documents, Visuals, Etc\1050.00 Professional Services Selection Process\1050.20 Construction Mgmt Services"
  </code></pre>