Last active
March 29, 2021 21:25
-
-
Save expiscornovus/f1eaeeabf91d471480d99b4af65f1c6d to your computer and use it in GitHub Desktop.
How to verify ULS log and Usage log file access in SharePoint 2013 via PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$usageservice = Get-SPUsageservice | |
$servers = Get-SpServer | ? {$_.Role -ne "Invalid"} | |
$usagelogdirunc = $usageservice.UsageLogDir -replace ':','$' | |
foreach | |
($server in $servers) | |
{ | |
$testuncpath = '\\' + $server.Address + '\' + $usagelogdirunc | |
$testuncpath | |
get-acl -Path $testuncpath | select -expand access | ? {$_.IdentityReference -like "*WSS_WPG" -or $.IdentityReference -like "*WSS_Admin_WPG"} | |
# get-acl -Path $testuncpath | select -expand access | ? {$_.IdentityReference -like "*Administrators"} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment