Test-Path only validates the existence of a thing.
the *-ACL cmdlets return permissions on an object (file, folder, registry, etc.)
Just look for the read permission and note, as a rule/practice, admins don't grant access rights to a user, they grant access rights to a group. So, as long as you are a member of a defined Account Group, you have access.
<#
Get specifics for a module, cmdlet, or function
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-acl?view=powershell-7
#>
(Get-Command -Name Get-Acl).Parameters
(Get-Command -Name Get-Acl).Parameters.Keys
Get-help -Name Get-Acl -Examples
<#
# Results
Get-Acl C:\Windows
Get-Acl -Path "C:\Windows\k*.log" | Format-List -Property PSPath, Sddl
Get-Acl -Path "C:/Windows/k*.log" -Audit | ForEach-Object { $_.Audit.Count }
Get-Acl -Path "HKLM:\System\CurrentControlSet\Control" | Format-List
Get-Acl -InputObject (Get-StorageSubsystem -Name S087)
#>
Get-help -Name Get-Acl -Full
Get-help -Name Get-Acl -Online
You can also use one of the other modules from the Microsoft powershellgallery.com
Find-MOdule -Name '*acl*' |
Format-Table -AutoSize
<#
# Results
Version Name Repository Description
------- ---- ---------- -----------
1.0.1 ACL-Permissions PSGallery A couple of ACL utilities, for repairing corrupt permissions and applying permissions for IIS AppPool identities
1.30.1.28 ACLReportTools PSGallery Provides Cmdlets for reporting on Share ACLs.
1.7 ACLHelpers PSGallery Modules to help work with ACLs (Access Control Rights)
1.0.1.0 ACLCleanup PSGallery A set of tools to help you clean your fileshares access control lists
0.1.2 ACLTools PSGallery Module for managing NTFS Acls on files and folders
...
#>
Find-MOdule -Name '*ntfs*' |
Format-Table -AutoSize
<#
# Results
Version Name Repository Description
------- ---- ---------- -----------
4.2.6 NTFSSecurity PSGallery Windows PowerShell Module for managing file and folder security on NTFS volumes
1.4.1 cNtfsAccessControl PSGallery The cNtfsAccessControl module contains DSC resources for NTFS access control management.
1.0 NTFSPermissionMigration PSGallery This module is used as a wrapper to the popular icacls utility to save permissions to a file and then restore those permissions to a mirror c...
#>
(Get-ChildItem -Path D:\temp | Get-NtfsAccess) -Match 'ReadAndExecute'