Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Commit 914bfaf

Browse files
authored
Merge pull request #3 from cunninghamp/development
V1.05
2 parents 2b754d5 + 40928a7 commit 914bfaf

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

ConfigureExchangeURLs.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ V1.01, 26/06/2015 - Added MAPI/HTTP URL configuration
8484
V1.02, 27/08/2015 - Improved error handling, can now specify multiple servers to configure at once.
8585
V1.03, 09/09/2015 - ExternalURL can now be $null
8686
V1.04, 17/11/2016 - Removed Outlook Anywhere auth settings, script now sets URLs only
87+
V1.05, 18/11/2016 - Added AutodiscoverSCP option so it can be set to a different URL than other services
8788
#>
8889

8990
#requires -version 2
@@ -100,6 +101,9 @@ param(
100101
[AllowEmptyString()]
101102
[string]$ExternalURL,
102103

104+
[Parameter( Mandatory=$false)]
105+
[string]$AutodiscoverSCP,
106+
103107
[Parameter( Mandatory=$false)]
104108
[Boolean]$InternalSSL=$true,
105109

@@ -191,7 +195,13 @@ Process {
191195
}
192196

193197
Write-Host "Configuring Autodiscover"
194-
Get-ClientAccessServer $i | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://$internalurl/Autodiscover/Autodiscover.xml
198+
if ($AutodiscoverSCP) {
199+
Get-ClientAccessServer $i | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://$AutodiscoverSCP/Autodiscover/Autodiscover.xml
200+
}
201+
else {
202+
Get-ClientAccessServer $i | Set-ClientAccessServer -AutoDiscoverServiceInternalUri https://$internalurl/Autodiscover/Autodiscover.xml
203+
}
204+
195205

196206
Write-Host "`r`n"
197207
}

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Parameters:
2626
- **-Server** - The name(s) of the server(s) you are configuring.
2727
- **-InternalURL** - The internal namespace you are using.
2828
- **-ExternalURL** - The external namespace you are using.
29-
- **-DefaultAuth** - The default authentication method to set for Outlook Anywhere. Defaults to NTLM.
29+
- **-AutodiscoverSCP** - Used to set a different Autodiscover URL if you need to.
3030
- **-InternalSSL** - Specifies the internal SSL requirement for Outlook Anywhere. Defaults to True (SSL required).
3131
- **-ExternalSSL** - Specifies the external SSL requirement for Outlook Anywhere. Defaults to True (SSL required).
3232

@@ -40,6 +40,10 @@ Examples:
4040
.\ConfigureExchangeURLs.ps1 -Server sydex1,sydex2 -InternalURL mail.exchangeserverpro.net -ExternalURL mail.exchangeserverpro.net
4141
```
4242

43+
```
44+
.\ConfigureExchangeURLs.ps1 -Server sydex1 -InternalURL mail.exchangeserverpro.net -ExternalURL mail.exchangeserverpro.net -AutodiscoverSCP autodiscover.exchangeserverpro.net
45+
```
46+
4347
##More Info
4448

4549
http://exchangeserverpro.com/powershell-script-configure-exchange-urls/

0 commit comments

Comments
 (0)