Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #.'E:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'
- #Connect-ExchangeServer -auto -ClientApplication:ManagementShell
- $newname = "webmail.domain.org"
- $server = hostname
- $activesyncvd = "https://" + $newname + "/Microsoft-Server-ActiveSync"
- $ecpvd = "https://" + $newname + "/ecp"
- $mapivd = "https://" + $newname + "/mapi"
- $oab = "https://" + $newname + "/OAB"
- $owa = "https://" + $newname + "/owa"
- $ews = "https://" + $newname + "/EWS/Exchange.asmx"
- $Autodiscover = "https://" + $newname + "/Autodiscover/Autodiscover.xml"
- #best config's for once Exchange has been migrated / new setup :
- #Get-OutlookAnywhere -ADPropertiesOnly -Server $server | Set-OutlookAnywhere -InternalHostname $newname -ExternalHostname $newname -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -ExternalClientAuthenticationMethod Negotiate -InternalClientAuthenticationMethod Negotiate -IISAuthenticationMethods Negotiate, Ntlm, Basic
- #Get-MapiVirtualDirectory -ADPropertiesOnly -Server $server | Set-MapiVirtualDirectory -InternalUrl $mapivd -ExternalUrl $mapivd -IISAuthenticationMethods Negotiate, Ntlm, OAuth
- #Set-OrganizationConfig -MapiHttpEnabled $true
- write-host "Setting up ActiveSync"
- Get-ActiveSyncVirtualDirectory -ADPropertiesOnly -Server $server | Set-ActiveSyncVirtualDirectory -ExternalUrl $activesyncvd -InternalUrl $activesyncvd
- write-host "Setting up ECP"
- Get-EcpVirtualDirectory -ADPropertiesOnly -Server $server | Set-EcpVirtualDirectory -InternalUrl $ecpvd -ExternalUrl $ecpvd
- write-host "Setting up OAB"
- Get-OabVirtualDirectory -ADPropertiesOnly -Server $server | Set-OabVirtualDirectory -InternalUrl $oab -ExternalUrl $oab
- write-host "Setting up OWA"
- Get-OwaVirtualDirectory -ADPropertiesOnly -Server $server | Set-OwaVirtualDirectory -InternalUrl $owa -ExternalUrl $owa
- write-host "Setting up EWS"
- Get-WebServicesVirtualDirectory -ADPropertiesOnly -Server $server | Set-WebServicesVirtualDirectory -InternalUrl $ews -ExternalUrl $ews
- write-host "Setting up Client Access Server"
- Get-ClientAccessService $server | Set-ClientAccessService -AutoDiscoverServiceInternalUri $Autodiscover
- write-host "Setting up Outlook Anywhere " -NoNewline
- write-host "for coexistence (Change to Negotiate once the project is finished)" -ForegroundColor Yellow
- Get-OutlookAnywhere -ADPropertiesOnly -Server $server | Set-OutlookAnywhere -ExternalHostname $newname -ExternalClientsRequireSsl $true -InternalClientsRequireSsl $true -ExternalClientAuthenticationMethod ntlm -InternalClientAuthenticationMethod ntlm -IISAuthenticationMethods Ntlm
- write-host "Setting up MAPI" -NoNewline
- write-host " And Disableing" -ForegroundColor red
- Get-MapiVirtualDirectory -ADPropertiesOnly -Server $server | Set-MapiVirtualDirectory -InternalUrl $mapivd -ExternalUrl $mapivd -IISAuthenticationMethods ntlm
- Set-OrganizationConfig -MapiHttpEnabled $false
- write-host "Done"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement