SMTP Port 25

Anything and Everything Related to Messaging and Collaboration, Active Directory and Scripting. It’s My Life!!!

Archive for January, 2011

Powershell to get the complete Exchange Database Name,Edb filepath and log file path into a Single file Report

Posted by Krishna - MVP on January 11, 2011

Powershell to get the complete Exchange Database Name,Edb filepath and log file path into a Single file Report

$exchangeservers = Get-ExchangeServer |where-object {$_.admindisplayversion.major -eq 8 -and $_.IsMailboxServer -eq $true }
$result = "Servername | Database Name | EDB file Path | Log files Path"
$result > DBresultfile.txt
foreach ($server in $exchangeservers)
{
 $db = Get-MailboxDatabase -server $server
 $servername = $server.name
 foreach ($objItem in $db)
  {
  $result = $servername + " | " + $objItem.Name  + " | " + ($objItem.EdbFilePath).pathname + " | " + ((Get-StorageGroup $objItem.StorageGroup | select LogFolderPath).LogFolderPath).pathname
  $result
  $result >> DBresultfile.txt
  }
}

Posted in Exchange 2007, Powershell | Tagged: , , , , | 2 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 49 other followers