Exchange 2007 Mailbox Server Role Storage Requirements Calculator

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.