Exchange 2007 Shell 指令筆記

--新增信箱帳號
New-Mailbox -database "First Storage Group\Mailbox Database" -Name "jimmy" -UserPrincipalName [email protected] -Password (ConvertTo-SecureString -String 'j!123456'  -AsPlainText -Force) -FirstName jimmy -LastName chen


--移除信箱帳號
Remove-Mailbox -Identity "carrie"


--取得所有信箱大小並存於桌面
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount >mailboxes.txt


--新增群組
New-DistributionGroup -Name "whole" -OrganizationalUnit "abc.local/Users" -SAMAccountName "whole" -Type "Security"


--新增群組成員
Add-DistributionGroupMember  -Identity "testg"  -Member "[email protected]"


--允許外部寄信給群組
Set-DistributionGroup -Identity "whole" -RequireSenderAuthenticationEnabled $false


--新增聯絡人
New-MailContact -Name "Jackie" -ExternalEmailAddress [email protected] -OrganizationalUnit "abc.local/Users"

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.