I am sure you all know there is a new Storage Calculator out in the wild not, ver 15.6
I have downloaded and read the article and found a need to pass this script on to you all. Basically about half way down is a link to Collectlogs VBS script
Come on! a VBS .. must be able to do that in PowerShell ;-) .. Well you sure can, and here is how!
PARAM ($InServer)
If ($InServer -eq $Null) {$InServer = Hostname}
$SGs = Get-StorageGroup -Server $InServer
ForEach ($SG in $SGs)
{
$x = $SG.LogFolderPath
$xLogpath = “\$InServer“
$xLogpath += $x
$xLogpath = $xLogpath.Replace(“:”,”$”)
Write-Host $xLogPath
$xLogFiles = [system.io.directory]::getfiles($xLogpath,”*.log”)
$xLogFileCnt = $xLogFiles.Count
Write-Host “Number of Log Files: $xLogFileCnt”
}
Quick & dirty .. Save the script and run it with or without a server name an it will give you the number of .log files in the each storage group directory! Sweeeeeet