Applies to: Exchange Server 2013
Topic Last Modified: 2013-01-08
Use the New-EdgeSubscription cmdlet to export an Edge Subscription file from an Edge Transport server and to import the Edge Subscription file to a Mailbox server.
Syntax
New-EdgeSubscription [-AccountExpiryDuration
<TimeSpan>] [-Confirm [<SwitchParameter>]]
[-CreateInboundSendConnector <$true | $false>]
[-CreateInternetSendConnector <$true | $false>]
[-DomainController <Fqdn>] [-FileData <Byte[]>]
[-FileName <LongPath>] [-Force <SwitchParameter>]
[-Site <AdSiteIdParameter>] [-WhatIf
[<SwitchParameter>]]
|
Examples
EXAMPLE 1
This example creates the Edge Subscription file. It should be run on your Edge Transport server.
Copy Code | |
---|---|
New-EdgeSubscription -FileName "c:\EdgeServerSubscription.xml" |
EXAMPLE 2
This example imports the Edge Subscription file
generated in EXAMPLE 1 to the Active Directory site
Default-First-Site-Name
. Importing the Edge
Subscription file completes the Edge Subscription process. You must
run this command on the Mailbox server.
The first command reads the data from the Edge Subscription file and stores it in a temporary variable as a byte-encoded data object. The second command completes the Edge subscription process.
Copy Code | |
---|---|
[byte[]]$Temp = Get-Content -Path "C:\EdgeServerSubscription.xml" -Encoding Byte -ReadCount 0 New-EdgeSubscription -FileData $Temp -Site "Default-First-Site-Name" |
EXAMPLE 3
This example also imports the Edge Subscription file
generated in EXAMPLE 1 to the Active Directory site
Default-First-Site-Name
; however, the end result is
accomplished in a single line of code. You must run this command on
the Mailbox server.
Copy Code | |
---|---|
New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path "C:\EdgeServerSubscription.xml" -Encoding Byte -ReadCount 0)) -Site "Default-First-Site-Name" |
Detailed Description
The Edge Transport server doesn't have access to Active Directory. All configuration and recipient information is stored in the Active Directory Lightweight Directory Services (AD LDS) instance. The New-EdgeSubscription cmdlet creates the Edge Subscription file that will be imported on a Mailbox server in the Active Directory site to which you want to subscribe this Edge Transport server..
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "EdgeSync" entry in the Mail Flow Permissions topic.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
AccountExpiryDuration |
Optional |
System.TimeSpan |
The AccountExpiryDuration parameter specifies how soon the bootstrap account created by this command will expire. To specify a value, enter it as a time span: dd.hh:mm:ss where d = days, h = hours, m = minutes, and s = seconds. The value for this parameter must be a minimum of
|
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch. |
CreateInboundSendConnector |
Optional |
System.Boolean |
The CreateInboundSendConnector parameter specifies
whether to create the Send connector to connect the Edge Transport
server and the Hub Transport servers. The default value is
|
CreateInternetSendConnector |
Optional |
System.Boolean |
The CreateInternetSendConnector parameter specifies
whether to create the Send connector to connect to the Internet.
The default value is |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory. |
FileData |
Optional |
System.Byte[] |
The FileData parameter specifies the byte-encoded data object that contains the Edge Subscription file information. For more information about the syntax required to use this parameter, see Exchange Management Shell Quick Reference for Exchange 2013. You can only use this parameter when you're running this command on a Mailbox server. |
FileName |
Optional |
Microsoft.Exchange.Data.LongPath |
The FileName parameter specifies the full path of the Edge Subscription file. You can only use this parameter when you're running this command on an Edge Transport server. |
Force |
Optional |
System.Management.Automation.SwitchParameter |
The Force switch specifies whether to suppress warning or confirmation messages. This switch can be used when the task is run programmatically and prompting for administrative input is inappropriate. If the Force switch isn't provided in the command, you're prompted for administrative input. You don't have to specify a value with this parameter. This switch is useful when you use a script with the Edge Subscription command because it bypasses confirmation. Another scenario in which this switch is useful is when you have to subscribe an Edge Transport server again, and you want to overwrite the existing configuration information. |
Site |
Optional |
Microsoft.Exchange.Configuration.Tasks.AdSiteIdParameter |
The Site parameter specifies the name of the Active Directory site that contains the Mailbox servers with which the Edge Transport servers are associated. This parameter is used and required only when you run the command on a Mailbox server. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch. |
Input Types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
Return Types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.