header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Size of edb and stm files
Last Post 23 Feb 2010 08:10 AM by Rob. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
RobUser is Offline
New Member
New Member
Posts:32
Avatar

--
23 Feb 2010 08:10 AM
    I found a scrpt and changed it to find the file size of the .edb and .stm files on one of the excahnge 2003 servers.

    Blow is the script, now the way we have it setup is that each database is on it's own drive and the databases are inside a folder named Exchange Databases 1, 2, 3 and 4 now i'm not sure how to reduce this script down, calling 4 fuctions seems long.

    Function get-edbandstm1{
    $filepath="\\$Server\E$\Exchange Databases 1"

    Get-ChildItem $filepath | where-object {$_.Extension -eq ".edb" -or $_.Extension -eq ".stm"} |`
    ForEach-Object { Write-Host $_.name,==> ($_.Length/1GB).tostring("0.00")GB}
    }
    Function get-edbandstm2{
    $filepath="\\$Server\G$\Exchange Databases 2"

    Get-ChildItem $filepath | where-object {$_.Extension -eq ".edb" -or $_.Extension -eq ".stm"} |`
    ForEach-Object { Write-Host $_.name,==> ($_.Length/1GB).tostring("0.00")GB}
    }
    Function get-edbandstm3{
    $filepath="\\$Server\I$\Exchange Databases 3"

    Get-ChildItem $filepath | where-object {$_.Extension -eq ".edb" -or $_.Extension -eq ".stm"} |`
    ForEach-Object { Write-Host $_.name,==> ($_.Length/1GB).tostring("0.00")GB}
    }
    Function get-edbandstm4{
    $filepath="\\$Server\K$\Exchange Databases 4"

    Get-ChildItem $filepath | where-object {$_.Extension -eq ".edb" -or $_.Extension -eq ".stm"} |`
    ForEach-Object { Write-Host $_.name,==> ($_.Length/1GB).tostring("0.00")GB}
    }
    $Server="lonsmsxm03"
    get-edbandstm1
    get-edbandstm2
    get-edbandstm3
    get-edbandstm4
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer