温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

exchange 2010 常用命令

发布时间:2020-06-22 06:17:47 来源:网络 阅读:709 作者:kangl 栏目:系统运维

1,查看邮箱大小

Get-Mailbox | Get-MailboxStatistics | ft DisplayName,TotalItemSize >C:\size.txt

2,默认地址列表和策略更新

Default E-Mail Address Policy:
Set-EmailAddressPolicy "Default Policy" -IncludedRecipients AllRecipients -ForceUpgrade

Default Address Lists:
Set-AddressList "All Contacts" -IncludedRecipients MailContacts -ForceUpgrade
Set-AddressList "All Groups" -IncludedRecipients MailGroups -ForceUpgrade
Set-AddressList "All Users" -IncludedRecipients MailboxUsers -ForceUpgrade
Set-GlobalAddressList "Default Global Address List" -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'))} -ForceUpgrade
Set-AddressList "Public Folders" -RecipientFilter { RecipientType -eq 'PublicFolder' } -ForceUpgrade
Set-AddressList itdept -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (Department -like 'itdept')}

3,收件人策略

Set-EmailAddressPolicy "Default Policy" -IncludedRecipients AllRecipients

Set-EmailAddressPolicy "gcr.com" -IncludedRecipients AllRecipients

4,获取公用文件夹

Get-PublicFolder -Recurse | ft name,replicas

5,修改邮件传输大小

Get-ReceiveConnector | Set-ReceiveConnector –MaxMessageSize 11MB

Get-SendConnector | Set-SendConnector –MaxMessageSize 11MB

Set-TransportConfig –MaxSendSize 11MB –MaxReceiveSize 11MB

Set-TransportConfig -InternalDsnMaxMessageSize 20MB

Get-Mailbox | Set-Mailbox -MaxSendSize 11MB –MaxReceiveSize 11MB

6,添加删除角色

driver:\setup /mode:install/uninstall /role:ht ca ...

7,设置rpc访问不加密

set-RpcClientAccess –ServerExchange_server_name–EncryptionRequired $ true

http://support.microsoft.com/kb/2006508

更新地址列表

get-addresslist | update-addresslist

为客户端用户添加访问公用文件夹内容的权限

Add-PublicFolderClientPermission cmdlet

或使用脚本 AddUsersToPFRecursive.ps1

删除或替换公用文件夹客户端权限

Remove-PublicFolderClientPermission cmdlet 或 RemoveUserFromPFRecursive.ps1 用户管理脚本

查看公用文件夹客户端权限设置

Get-PublicFolderClientPermission cmdlet

查看公用文件夹管理权限设置

Get-PublicFolderAdministrativePermission

创建或删除自定义资源属性

Get-ResourceConfig 和 Set-ResourceConfig

自定义资源调度的响应邮件

Set-MailboxCalendarSettings cmdlet

设置资源预订策略

Set-MailboxCalendarSettings cmdlet

设置调度角色成员身份

Set-MailboxCalendarSettings cmdlet

将基于 Exchange 2003 自动接受代理的资源邮箱升级到 Exchange 2007

在 Exchange 2003 计算机的命令提示符窗口中运行 RegisterMailbox.vbs /u

Set-Mailbox -Identity ConferenceRoom1 -Type Room

Set-MailboxCalendarSettings -Identity TedBremer -AutomateProcessing AutoAccept

启用或禁用对会议邮件的自动处理

Set-MailboxCalendarSettings cmdlet

删除过期会议请求和响应

Set-MailboxCalendarSettings -Identity "Ellen Adams" -RemoveOldMeetingMessages:$true

禁用删除过期的会议请求和响应

Set-MailboxCalendarSettings -Identity "Ellen Adams" -RemoveOldMeetingMessages:$false

启用基于每个用户的外部外出邮件

Set-Mailbox "Ellen Adams" -ExternalOofOptions External

管理配额邮件

New-SystemMessage、Get-SystemMessage、Set-SystemMessage 和 Remove-SystemMessage cmdlet

将公用文件夹内容从一个公用文件夹数据库移动到另一个公用文件夹数据库

MoveAllReplicas.ps1

ReplaceReplicaOnPFRecursive.ps1

恢复公用文件夹内容的复制

Resume-PublicFolderReplication

挂起公用文件夹内容复制

Suspend-PublicFolderReplication

获取公用文件夹的统计信息

Get-PublicFolderStatistics -Identity <;PublicFolderIdParameter>

将资源邮箱添加到地址列表

Set-AddressList cmdlet

移动地址列表

Move-AddressList -Identity <AddressListIdParameter> -Target <AddressListIdParameter>

使用收件人筛选器创建地址列表

New-AddressList -Name <String> -RecipientFilter <String>

查看地址列表的成员

Get-Recipient cmdlet

创建脱机通讯簿虚拟目录

New-OABVirtualDirectorycmdlet

删除、重新创建和重新连接脱机通讯簿虚拟目录

Get-OABVirtualDirectory

Remove-OABVirtualDirectory

为脱机通讯簿分发要求 SSL

Set-OABVirtualDirectory

使用收件人筛选器创建电子邮件地址策略

New-EmailAddressPolicy -Name <String> -RecipientFilter <String>

禁用或启用 Exchange 搜索

Set-MailboxDatabase MailboxDatabaseName -IndexEnabled $false

Set-MailboxDatabase MailboxDatabaseName -IndexEnabled $true

Get-MailboxDatabase cmdlet 或 Test-ExchangeSearch cmdlet

创建全局地址列表 以及修改 删除 和更新

New-GlobalAddressList cmdlet

Set-GlobalAddressList cmdlet

Remove-GlobalAddressList cmdlet

Update-GlobalAddressList cmdlet

在 Exchange 2007 中创建 Outlook Web Access 虚拟目录并查看修改删除

New-OWAVirtualDirectory cmdlet

Get-OWAVirtualDirectory

Set-owavirtualdirectory

Remove-OwaVirtualDirectory

启用 Outlook Web Access 中的明确登录

Add-MailboxPermission

配置 Gzip 压缩设置

Set-OwaVirtualDirectory -identity "owa (Default Web Site)" -GzipLevel High

为 Outlook Web Access 配置登录和错误语言设置

Set-OwaVirtualDirectory -identity "Owa (Default Web Site)" -DefaultClientLangugage <language code>

为单个邮箱配置客户端语言设置

Set-OwaVirtualDirectory -identity "Owa (Default Web Site)" -DefaultClientLangugage <language code>

创建和删除 Exchange ActiveSync 虚拟目录.

New-ActiveSyncVirtualDirectory

Remove-ActiveSyncVirtualDirectory

在 Exchange ActiveSync 中使用 Exchange 命令行管理程序来配置 Autodiscover

Set-ActiveSyncVirtualDirectory -Identity "COMPUTERNAME\Microsoft-Server-ActiveSync (Default Web Site)" -ExternalURL

生成 Exchange ActiveSync 报告

Export-ActiveSyncLog

禁用 Exchange ActiveSync 的设备

Set-CASMailbox -Identity: "EmailAlias" -ActiveSyncAllowedDeviceIDs: "<DeviceID_1>","<DeviceID_2>"

查看所有用户的邮箱大小及邮件数量

Get-MailboxStatistics | select DisplayName, ItemCount, TotalItemSize

使 POP3 和 IMAP4 用户能够使用默认协议设置

Set-PopSettings 或 Set-ImapSettings cmdlet

配置对 Exchange 2003 服务器的 POP3 访问

Set-PopSettings -ProxyTargetPort 110

禁用对 Exchange 2003 服务器的 POP3 访问

Set-PopSettings -ProxyTargetPort 0

配置 IMAP4 访问 Exchange 2003 服务器

Set-ImapSettings -ProxyTargetPort 143

Set-ImapSettings -ProxyTargetPort 0(禁用)

新建自动发现服务虚拟目录

New-AutodiscoverVirtualDirectory -Websitename <websitename> -BasicAuthentication:$true -WindowsAuthentication:$true

删除默认的自动发现服务虚拟目录

Remove-AutodiscoverVirtualDirectory -Identity "MyServer\autodiscover(autodiscover.contoso.com)"

测试 Outlook 2007 自动发现连接性

Test-OutlookWebServices -ClientAccessServer "CASServer01"

多个林配置 Autodiscover 服务

Export-AutodiscoverConfig cmdlet

配置自动发现服务以使用站点关联

Set-ClientAccessServer -Identity "ServerName" -AutodiscoverServiceInternalURI "https://internalsitename/autodiscover/autodiscover.xml" AutodiscoverSiteScope "SiteName"

为网络负载平衡的计算机配置可用性服务

Set-WebServicesVirtualDirectory cmdlet

诊断可用性服务的问题

Test-OutlookWebServices cmdlet

使用其他受信任的证书替换默认 SSL 证书

Get-ExchangeCertificate cmdlet

Export-ExchangeCertificate

请求 SSL 证书

New-ExchangeCertificate

在单个邮箱上配置反垃圾邮件功能

set-Mailbox -Identity <MailboxIdParameter> -AntispamBypassEnabled <$true | $false> -RequireSenderAuthenticationEnabled <$true | $false> -SCLDeleteEnabled <$true | $false | $null> -SCLDeleteThreshold <Nullable> -SCLJunkEnabled <$true | $false | $null > -SCLJunkThreshold <Nullable> -SCLQuarantineEnabled <$true | $false | $null > -SCLQuarantineThreshold <Nullable> -SCLRejectEnabled <$true | $false | $null > -SCLRejectThreshold <Nullable>

多个邮箱上配置反垃圾邮件功能

Set-OrganizationConfig -SCLJunkThreshold <Int32>

导出邮箱数据

Export-Mailbox

从 .pst 文件导入邮箱数据

Import-Mailbox -Identity -PSTFolderPath C:\PSTFiles\john.pst

转换邮箱

Set-Mailbox ConfRoom1 -Type Room

更改用户邮箱的语言

Set-Mailbox -Identity "user" -Languages "Languages"

管理程序限制整个 Exchange 组织中每封邮件的收件人数

Set-TransportConfig -MaxRecipientEnvelopeLimit

管理程序限制接收连接器中每封邮件的收件人数

Set-ReceiveConnector -Identity "Contoso Receive Connector" -MaxRecipientsPerMessage

管理程序限制集线器传输服务器中每封邮件的收件人数

Set-TransportServer -Identity "Server01" -PickupDirectoryMaxRecipientsPerMessage

资源邮箱上启用或禁用自动预定

Set-MailboxCalendarSettings <Identity> -AutomateProcessing:AutoAccept

设置资源邮箱上的委派

Set-MailboxCalendarSettings cmdlet

设置对资源邮箱日程的完全控制访问权限.

Add-MailboxPermission cmdlet

对多个现有联系人启用邮件

Get-Contact | Out-File "C:\ContactsList.CSV"

管理外部邮局主管地址

Set-TransportServer <TransportServerName> -ExternalPostmasterAddress <ExternalPostmasterSMTPAddress>

在林之间移动邮箱

Move-Mailbox cmdlet

GlobalCatalog 和 SourceForestGlobalCatalog 参数用于查找目标林和源林中的邮箱

合并邮箱

Move-Mailbox -Identity john -TargetDatabase "Mailbox Database" -AllowMerge $true

查看 UM 服务器的活动呼叫数

Get-UMActiveCalls -Server MyUMServer

向统一消息服务器添加统一消息语言

Setup.com /AddUmLanguagePack:<UmLanguagePackName> /s: d:\<MyLocalFolder>

从统一消息服务器上删除统一消息语言包

Setup.com /RemoveUmLanguagePack:<UmLanguagePackName> /s: d:\<MyLocalFolder>

将接收连接器链接到新的发送连接器

New-SendConnector -Name <ConnectorName> -LinkedReceiveConnector <ReceiveConnectorID> -SmartHosts <SmarthostID> -SmartHostAuthMechanism <AuthMechanism> -DNSRoutingEnabled $False -MaxMessageSize unlimited

将接收连接器链接到现有的发送连接器

Set-SendConnector <ConnectorID> -LinkedReceiveConnector <ReceiveConnectorID> -SmartHosts <SmarthostID> -SmartHostAuthMechanism <AuthMechanism> AddressSpaces $Null -DNSRoutingEnabled $False -MaxMessageSize unlimited

修改默认 SMTP 标题

Set-ReceiveConnector cmdlet 或 New-ReceiveConnector cmdlet 中的 Banner 参数可控制 SMTP 标题

Set-ReceiveConnector <ConnectorIdentity> -Banner "<220 RemainingBannerText>"

新建 查看 修改 删除外部连接器

New-ForeignConnector

Get-ForeignConnector

Set-ForeignConnector

Remove-ForeignConnector

配置外部连接器的投递目录

Set-TransportServer cmdlet 中的 RootDropDirectoryPath 参数

Set-ForeignConnector cmdlet 中的 DropDirectory 参数

验证收件人的 EdgeSync 结果

Get-User -Identity User | ft Name, GUID

配置分拣目录

Set-TransportServer <Identity> -PickupDirectoryPath <LocalFilePath>

配置重播目录

Set-TransportServer <Identity> -ReplayDirectoryPath <LocalFilePath>

安装传输代理

Install-TransportAgent cmdlet

查看传输管道中的传输代理
Get-TransportPipeline cmdlet

将管道跟踪发件人地址配置捕获来自特定 SMTP 地址的邮件

Set-TransportServer <Identity> -PipelineTracingSenderAddress <SMTPAddress>

将管道跟踪发件人地址配置为捕获邮件服务器生成的邮件

Set-TransportServer <Identity> -PipelineTracingSenderAddress "<>"

与系统邮件一起使用的所支持区域设置

New-SystemMessage 和 Set-SystemMessage cmdlet

重写单个电子邮件地址

New-Addre***ewriteEntry -Name <address rewrite entry name> -InternalAddress <internal e-mail address> -ExternalAddress <external e-mail address>

查看地址重写条目

Get-Addre***ewriteEntry

更改路由表日志位置

Set-TransportServer <Identity> -RoutingTableLogPath <LocalFilePath>

更改路由表日志目录的最大大小

Set-TransportServer <Identity> -RoutingTableLogMaxDirectorySize <DirectorySize>

将 Active Directory 网站配置为中心网站

Set-AdSite -Identity "Site A" -HubSiteEnabled $true

设置 Active Directory IP 网站链接上的 Exchange 开销

Set-AdSiteLink -Identity IPSITELINKAB -ExchangeCost 10

在 Active Directory 站点链接上配置最大邮件大小限制

Set-AdSiteLink -Identity DEFAULTIPSITELINK -MaxMessageSize 10MB

在路由组连接器上配置最大邮件大小限制

Set-RoutingGroupConnector -Identity "Exchange Administrative Group (FYDIBOHF23SPDLT)\Exchange Routing Group (DWBGZMFD01QNBJR)\Ex2007 to 2003 RGC" -MaxMessageSize 10MB

禁用或启用 AD RMS 预许可代理

Disable-TransportAgent "AD RMS Prelicensing Agent"

Enable-TransportAgent "AD RMS Prelicensing Agent"

配置附件筛选

Add-AttachmentFilterEntry -Name <MIMEContentType> -Type ContentType

启用或禁用 Outlook 电子邮戳验证

Set-ContentFilterConfig -OutlookEmailPostmarkValidationEnabled $true

Set-ContentFilterConfig -OutlookEmailPostmarkValidationEnabled $false

配置内容筛选的拒绝响应

Set-ContentFilterConfig -RejectionResponse <AsciiString>

将收件人域和发件人域排除在发件人 ID 筛选之外

Set-SenderIDConfig -BypassedRecipients <MultiValuedProperty>

Set-SenderIDConfig -BypassedSenderDomains <MultiValuedProperty>

为发件人信誉配置出站访问以实现开放代理服务器的检测功能

Set-SenderReputationConfig -ProxyServerName <String> -ProxyServerPort <Int32> -ProxyServerType <String>

指定垃圾邮件隔离邮箱.

Set-ContentFilterConfig -QuarantineMailbox <SmtpAddress>

在集线器传输服务器上启用反垃圾邮件功能

install-AntispamAgents.ps1

为 WinHTTP 配置代理设置

proxycfg -p proxy_server "<local>"

自定义默认邮件分类

Set-MessageClassification cmdlet

复制边缘传输服务器上的传输规则配置

Export-TransportRuleCollection C:\Backups\EDGE02.XML

配置日记邮箱

Set-Mailbox <Journaling mailbox to configure> -AcceptMessagesOnlyFrom "Microsoft Exchange" -RequireSenderAuthenticationEnabled $True

配置备用日记邮箱

Set-TransportConfig -JournalingReportNdrTo "<>"

启用或禁用对语音邮件和丢失呼叫通知记录日记的功能

Set-TransportConfig -VoicemailJournalingEnabled $False

使用克隆配置任务备份边缘传输服务器

ExportEdgeConfig.ps1

将本地连续复制副本设定为种子

Update-StorageGroupCopy cmdlet

切换到数据库的被动副本

Restore-StorageGroupCopy cmdlet

对群集网络禁用连续复制

Disable-ContinuousReplicationHostName -Identity <CMSName> -HostName <HostName>

查看故障转移控制配置

Get-MailboxServer -Identity:<CMSName> | Format-List

查看群集邮箱服务器的状态

Get-ClusteredMailboxServerStatus -Identity:<Name>

在群集连续复制环境中移动存储组

Suspend-StorageGroupCopy -Identity <Server\StorageGroupName>

暂停群集连续复制副本的复制

Suspend-StorageGroupCopy -Identity:<Server\StorageGroup> -suspendcomment:<Comment>

重新启动群集连续复制副本的复制

Resume-StorageGroupCopy -Identity:<Server\StorageGroup>

在发生故障或更改后还原 CCR 功能

Get-ClusteredMailboxServer -Identity:<Server>

启用 SCR 的存储组移动存储组文件的位置

Suspend-StorageGroupCopy -Identity <Server\StorageGroupName> -StandbyMachine <NameOfSCRTargetMachine>

查看已经启用备用连续复制 (SCR) 的存储组的状态

Get-StorageGroupCopyStatus -Identity <Server>\<StorageGroup> -StandbyMachine

SCR 和数据库可移植性

Test-ReplicationHealth 和 Get-StorageGroupCopyStatus cmdlet

查看单一副本群集中群集邮箱服务器的状态

Get-ClusteredMailboxServerStatus -Identity:<Name>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI