Posts

Showing posts from February 23, 2014

E14–Bulk Create Contacts

Image
  http://howdouc.blogspot.tw/2010/06/bulk-importcreate-mail-enabled-contacts.html http://msexchangeguru.com/2012/11/16/contacts-in-bulk/   [PS] C:\>$csvinfo = Import-Csv ABC.csv 建立MailContact [PS] C:\>foreach ($line in $csvinfo) {New-MailContact -Name $line.name -ExternalEmailAddress $line.Em ailAddress -LastName $line.LastName -DisplayName $line.DisplayName -Alias $line.Alias -OrganizationalUnit ABC_OU}   更新contact 的phone 資訊  (要從contact 更新,非MailContact) [PS] C:\>foreach ($line in $csvinfo) {Get-Contact -Identity "$($line.DisplayName)" | Set-Contact -Pho ne "$($Line.BusinessPhone)"} 更新中文姓名 (csv 轉存 utf-8) [PS] C:\>foreach ($line in $csvinfo) {Get-Contact -Identity "$($line.DisplayName)" | Set-Contact -Las tName "$($Line.LastName)"}

E14: DB count & size

  http://msundis.wordpress.com/2011/10/28/quick-tip-view-the-database-size-and-mailbox-count-for-mailbox-databases/ Mailbox count for mailbox databases Get-Mailbox -server BQT-MBX01 -ResultSize:Unlimited | Group-Object -Property:Database | Select-Object Name,Count | Sort-Object -Property:Count –Descending   MailboxDatabase sizes Get-MailboxDatabase -Server bqt-mbx01 -Status | select Servername,Name,databasesize