-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCopyExchangeSMTPConnector.ps1
34 lines (23 loc) · 1.01 KB
/
CopyExchangeSMTPConnector.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<#
.SYNOPSIS
copy recieve connector to an other server
Johannes Schüler
.DESCRIPTION
Revision History
--------------------------------------------------------------------------------
1.0 Initial release
.PARAMETER connector
The connector to copy
.PARAMETER connector
The Server of the destination
.EXAMPLE
CopyExchangeSMTPConnector.ps1 recieveconnector newserver
.\Purge-LogFiles -DaysToKeep 7 -Auto
#>
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
param(
[string]$Connector=(Read-Host "Quellconnector Angeben"),
[string]$DatabaseDestination=(Read-Host "Bitte Zielserver angeben")
)
(Get-ReceiveConnector -Identity "EX01-2016\SMTP relay").RemoteIPRanges | Sort-Object | Format-Table
New-ReceiveConnector -Name "SMTP relay" -Server "EX02-2016" -Usage Custom -TransportRole FrontEndTransport -PermissionGroups AnonymousUsers -Bindings 0.0.0.0:25 -RemoteIPRanges (Get-ReceiveConnector "EX01-2016\SMTP relay").RemoteIPRanges