原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。 http://landl.blog.51cto.com/923633/494510
==========
import PST文件内容进入邮箱
new-mailboximportrequest -mailbox "mikekcwong" -filepath \\ip\dmail\mikekcwong.pst -targetrootfolder "oldmail"
=====================================
移动数据库目录命令
move-DatabasePath -Identity "mailserver"\Second Storage Group\Public Folder Database' -EdbFilePath 'D:\ExchangeData\Second Storage Group\Public Folder Database.edb' -ConfigurationOnly
==========
export-mailbox –Identity szlizhigang -IncludeFolders “\Recoverable Items” –DeleteContent
删除exchange2010的用户邮箱中彻底删除在exchange系统中设定的已删除文件夹可恢复时间内邮件
Search-Mailbox -Identity lichai -SearchDumpsterOnly -DeleteContent
==============
授权用户"Mailbox Import Export"权限
New-ManagementRoleAssignment -Name "ImpExp " -User davidfung -Role "Mailbox Import Export"
===========================
申请证书命令
New-ExchangeCertificate -GenerateRequest -Path c:\cv-cas01.txt -KeySize 1024 -SubjectName "c=CN, s=shenzhen, l=shenzhen, o=collection, ou=IT, cn=mail.*.com.cn" -DomainName mail.*.com.cn, owa.*.com.cn, autodiscover.*.com.cn,cv-cas01.*.com.cn,cv-cas01,*.*.com.cn -PrivateKeyExportable $True
import证书并激活相应服务
Import-ExchangeCertificate -path c:\certnew.cer | enable-exchangecertificate -services "IIS,POP,IMAP"
===================================
==================================
新建电子策略 --显示名称 CB开头
New-EmailAddressPolicy -Name 'domainname.com' -EnabledEmailAddressTemplates 'SMTP:%2g%
[email protected]' -RecipientFilter {((Alias -ne $null) -and ((((ObjectClass -eq 'user') -or (ObjectClass -eq 'contact') -or (ObjectClass -eq 'msExchSystemMailbox') -or (ObjectClass -eq 'msExchDynamicDistributionList') -or (ObjectClass -eq 'group') -or (ObjectClass -eq 'publicFolder'))))) -and (DisplayName -like 'cc*')}
New-EmailAddressPolicy -Name 'ricacorp.com' -EnabledEmailAddressTemplates 'SMTP:%2g%
[email protected] -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (DisplayName -like 'cb*')}
====================
查找组中的成员后设置发送邮件的大小限制
Get-DistributionGroupMember -Identity "Groupname" | Set-Mailbox -maxsendsize 102400
======================
输入产品序列号
Set-ExchangeServer -Identity Servername -ProductKey Key
========================
Set-MailboxDatabase <name> -RPCClientAccessServer <internal_only_CAS_Array_FQDN>
添加CAS NLB陈列
New-ClientAccessArray -Name “Internal CAS Array” -FQDN internalCASArray.client.local
======================================
查看邮箱数据库的rpc阵列服务器
get-mailboxdatabase | Select Name,RPCClientAccessServer | fl
==================================
在站点中添加CAS NLB陈列
New-ClientAccessArray -FQDN hkcs-cas.centaline.com.cn -Site "HKGroup" -Name "name.com.cn"
set-mailboxdatabase "DBname" - rpcclientaccessserver Server-full-name
set-mailboxdatabase -server servername | set-rpcclientAccessserver
set-RpcClientAccess -Server cesp-cas01 -EncryptionRequired $false
get-rpcclientAccess -server Cesp-cas01
netsh interface ipv4 set int "Public" forwarding=enabled
======================================
删除默认建立的数据库前,你需要查找arbitration邮箱查找并移动到其他DB上
Get-Mailbox –Database “Mailbox Database” –arbitration
Get-Mailbox –Database “Mailbox Database” –arbitration | New-MoveRequest – TargetDatabase “Mailbox Database 2”
=======================
设置owa访问exchange2003的URL
Set-OWAVirtualDirectory <CAS2010>\OWA* -Exchange2003URL https://legacy.contoso.com/exchange
============================
查找组中的成员且为某一个数据库的成员并迁移到新的服务器数据库
Get-DistributionGroupMember -Identity "groupname" | where {$_.database -match "ex14szlimited100m01"} | New-MoveRequest -TargetDatabase "Ex14CentaLimited100M" -BadItemLimit 5 -AcceptLargeDataLoss -BatchName ldltest
查找组中的成员且并迁移到新的服务器数据库
Get-DistributionGroupMember -Identity "groupname" | New-MoveRequest -TargetDatabase "Ex14szLimited100M02" -BadItemLimit 10 -AcceptLargeDataLoss -BatchName ldltest
移动用户到其他数据库
New-MoveRequest -Identity jim -TargetDatabase "Ex14CentaLimited100M" -BadItemLimit 5 -AcceptLargeDataLoss -BatchName ldltest
============================================
建立DAG
New-DatabaseAvailabilityGroup -Name DAGname -WitnessServer Serverfullname -WitnessDirectory C:\目录名称 -DatabaseAvailabilityGroupIPAddresses 10.29.153.19