Get-acl on system file not working

Hello, I’m trying to do a

get-acl c:\windows\system32\winload.exe

but it’s returning with

Get-Acl : Cannot find path 'C:\Windows\system32\winload.exe' because it does not exist.
At line:1 char:8
+ Get-Acl <<<<  C:\Windows\system32\winload.exe
    + CategoryInfo          : ObjectNotFound: (:) [Get-Acl], ItemNotFoundException
    + FullyQualifiedErrorId : GetAcl_PathNotFound_Exception,Microsoft.PowerShell.Commands.GetAclCommand

The file does certainly exist in that location, i’m not sure why it’s not working. I am also not able to do a test-path to it

verify the file exist. is the file hidden?

Verified file does exist, I am looking at it in through explorer.

I have unchecked show hidden files/show protected system files

Tested on my windows 7 VM

Just tested this on Windows 2008 R2 without any issue…peculiar…I’ll just assume my VM is acting up…thanks Mark for your help!

What is the version of your powershell?

v2, but after trying the exact command on co-worker’s win7 VM it works just fine…

I’m assuming it’s my VM as it’s doing a few odd things with powershell and get-acl

Try putting the path in quotes:
get-acl “c:\windows\system32\winload.exe”

Try this so you can read the full output.
get-acl “c:\windows\system32\winload.exe” | Format-Table -Wrap -AutoSize

Verify if your file in this location exactly:

  • test if it located in C:\Windows\SysWOW64 if you run x32 PS version

  • test if it exists when you run PS in admin mode
    user mode explorer can show that your file in
    but actually it located in