Why not use a PowerShell cmdlet to get that information?
Get-ACL -Path <path-to-file> -Audit
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all please how can i get audit setting of file / folder by powershell 7?
On PS 5 is method GetAccessControl('Access, Audit').AreAuditRulesProtected
I need to check if audit settings has enabled inheritance.
Why not use a PowerShell cmdlet to get that information?
Get-ACL -Path <path-to-file> -Audit
Hi @Belan Marek
Kindly run following query in administrator mode.
$path = "C:\Users\ravi2_000\OneDrive\Desktop\Loan"
$f = Get-Item $path
$f.GetAccessControl()
$f.GetAccessControl('Access, Audit').AreAuditRulesProtected
Result would be as below,
Path Owner / Access
5CD4392B17\ravi2_000 NT AUTHORITY\SYSTEM Allow FullControl...
False
Here is a helpful page with information about Windows PowerShell
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/powershell
--------------
--If the reply is helpful, please Upvote and Accept as answer.--