Forum

MS Exchange 2007 Sh...
 
Bildirimler
Hepsini Temizle

MS Exchange 2007 Shell Command

3 Yazılar
2 Üyeler
0 Likes
370 Görüntüleme
(@ErkanCengiz)
Gönderiler: 29
Eminent Member
Konu başlatıcı
 

Merhaba ; 

 Exchange 2007 Kullanıyorum

 Get-MailboxStatistics | sort -property Displayname | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount  

 

- Komutunu Kullanarak Aşağıdaki Listeyi Elde Ediyorum .. Fakat Buna Ek Olarak Kullanıcılara Vermiş Mail Kotalarını Göstermek İstesem Nasıl Bir Kod Kullanmam Gerekir? 

DisplayName  TotalItemSize(MB)  ItemCount -----------  -----------------  --------- İsim Soyisim  892 8671 Cozum Park 132 2472
 
Gönderildi : 27/01/2010 19:49

Hakan Uzuner
(@hakanuzuner)
Gönderiler: 32988
Illustrious Member Yönetici
 

Merhaba

aşağıdaki script i kullanabilirsiniz

 

# Get-MailboxQuota.ps1

# Script for showing mailbox size and
quota

 

# Exit the script if username is not
found

If ($args[0] -eq $null) {

      Write-Host
"Error: No user specified" -ForegroundColor "Red"

      break

}

 

# Get the username from the command line
argument

$username
= $args[0]

 

# Get the mailbox, break if it's not
found

$mb
= Get-Mailbox
$username
-ErrorAction Stop

 

# Get the mailbox statistics

$mbstats
=
Get-MailboxStatistics
$username

 

# If the mailbox is using the database quotas then
read them, otherwise read them from the mailbox

If ($mb.UseDatabaseQuotaDefaults -eq $true) {

      $quota = (Get-MailboxDatabase
-Identity
$mb.Database).ProhibitSendQuota.Value.ToMB()

} else {

      $quota = $mb.ProhibitSendQuota.Value.ToMB()

}

 

# Get the mailbox size and convert it from bytes
to megabytes

$size
= $mbstats.TotalItemSize.Value.ToMB()

 

# Write the output

Write-Host "Mailbox:  
"

$mb.DisplayName

Write-Host "Size (MB):
"
$size

Write-Host "Quota
(MB):"
$quota

Write-Host "Percent:  
"

(
$size/$quota*100)

Write-Host

Danışman - ITSTACK Bilgi Sistemleri
****************************************************************
Probleminiz Çözüldüğünde Sonucu Burada Paylaşırsanız.
Sizde Aynı Problemi Yaşayanlar İçin Yardım Etmiş Olursunuz.
Eğer sorununuz çözüldü ise lütfen "çözüldü" olarak işaretlerseniz diğer üyeler için çok büyük kolaylık sağlayacaktır.
*****************************************************************

 
Gönderildi : 28/01/2010 01:40

(@ErkanCengiz)
Gönderiler: 29
Eminent Member
Konu başlatıcı
 

Hocam Bu Scripti Direk Shell'e Yapıştırıp mı Çalıştırmam Gerekiyor. Yoksa İhtiyacım Olanlarımı Kullanacağım İçerisinden ? 

 

 Teşekkürler.. 

 
Gönderildi : 28/01/2010 17:37

Paylaş: