Home   Kaiming



Please complete the Active Directory configuration for multi-hosting AD Setup.

domain layout

Fresh start

Get-Mailbox | remove-mailbox

create authoritative domains

New-AcceptedDomain -Name 'house.com' -DomainName 'house.com' -DomainType 'Authoritative'
New-AcceptedDomain -Name 'newton.com' -DomainName 'newton.com' -DomainType 'Authoritative'
New-AcceptedDomain -Name 'work.com' -DomainName 'Issac.com' -DomainType 'Authoritative'

Create separate mailbox databases

New-mailboxdatabase -StorageGroup 'EX20071\First Storage Group' -Name 'House' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\House.edb'

New-mailboxdatabase -StorageGroup 'EX20071\First Storage Group' -Name 'Newton' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Newton.edb'

New-mailboxdatabase -StorageGroup 'EX20071\First Storage Group' -Name 'Issac' -EdbFilePath 'C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Issac.edb'

 

mount-database -Identity house
mount-database –Identity Newton
mount-database –Identity issac

Configure POP3 and start POP3 service

By default, POP3 service accepts only TLS authentication. If you have certificate binding to POP3 service, the default authentication mechanism is fine. Here, I configure POP3 to use Basic Authentication.

Get-ReceiveConnector 'Client Ex20071' | fl bindings,Permission*,auth*

Bindings         : {0.0.0.0:587}
PermissionGroups : ExchangeUsers
AuthMechanism    : Tls, Integrated, BasicAuth, BasicAuthRequireTLS

Set-ReceiveConnector 'Client ex20071' -AuthMechanism BasicAuth

Start-Service msExchangePop3

define email address policy

new-EmailAddressPolicy -Name 'issac.com' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'issac' -Priority '1' -EnabledEmailAddressTemplates 'SMTP:%g.%s@issac.com'

update-EmailAddressPolicy -Identity 'issac.com'

new-EmailAddressPolicy -Name 'newton.com' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'newton' -Priority '2' -EnabledEmailAddressTemplates 'SMTP:%g.%s@newton.com'

update-EmailAddressPolicy -Identity 'newton.com'

new-EmailAddressPolicy -Name 'house.com' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'house' -Priority '3' -EnabledEmailAddressTemplates 'SMTP:%g.%s@house.com'

update-EmailAddressPolicy -Identity 'house.com'

create mailboxes in corresponding OUs

$password=read-host "Enter password please!" -asSecureString

House Company

$firstName="George"
$lastName="Allistair"
$company="House"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/House OU" -UserPrincipalName "$firstName.$lastName@house.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\House"
 
 
Set-User -Identity "$firstName.$lastname" -Company $company 
 
$firstName="Shane"
$lastName="Williams"
$company="House"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/House OU" -UserPrincipalName "$firstName.$lastName@house.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\house"
 
 
Set-User -Identity "$firstName.$lastname" -Company $company 
 
$firstName="Rob"
$lastName="Prince"
$company="House"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/House OU" -UserPrincipalName "$firstName.$lastName@house.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\House"
 
 
Set-User -Identity "$firstName.$lastname" -Company $company

Newton Company

$firstName="Tim"
$lastName="Thorthon"
$company="newton"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/newton OU" -UserPrincipalName "$firstName$lastName@newton.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\newton"


Set-User -Identity "$firstName.$lastname" -Company $company 

$firstName="iRene"
$lastName="Will"
$company="newton"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/newton OU" -UserPrincipalName "$firstName.$lastName@newton.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\newton"


Set-User -Identity "$firstName.$lastname" -Company $company 

$firstName="Bob"
$lastName="Preston"
$company="newton"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/newton OU" -UserPrincipalName "$firstName.$lastName@newton.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\newton"


Set-User -Identity "$firstName.$lastname" -Company $company

Issac Company

$firstName="Sam"
$lastName="aston"
$company="Issac"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/Issac OU" -UserPrincipalName "$firstName.$lastName@Issac.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\Issac"


Set-User -Identity "$firstName.$lastname" -Company $company 

$firstName="rena"
$lastName="hicken"
$company="Issac"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/Issac OU" -UserPrincipalName "$firstName.$lastName@Issac.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\Issac"


Set-User -Identity "$firstName.$lastname" -Company $company 

$firstName="Ashly"
$lastName="Plaston"
$company="Issac"
New-Mailbox -Name "$firstName $lastName" -Alias "$firstName.$lastName" -OrganizationalUnit "work.com/Issac OU" -UserPrincipalName "$firstName.$lastName@Issac.com" -SamAccountName "$firstName.$lastName" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\Issac"


Set-User -Identity "$firstName.$lastname" -Company $company

Configure POP3 clients

pop3

smtp

smtp2

Users in House and Newton companies have their own e-mail addresses.

How about to configure Outlook with Exchange option?

mailbox1

Rob.Prince@house.com sees all the users, including recipients from other companies.

If your multi-hosting supports only POP3 or IMAP clients, up-to-now configuration is sufficient.


Each company will see the recipients from its own company for Outlook client with Exchange mailbox configured.

Create the specific Global Address List

New-GlobalAddressList -Name "Global House" -IncludedRecipients "AllRecipients" -conditionalCompany "house"

New-GlobalAddressList -Name "Global Newton" -IncludedRecipients "AllRecipients" -ConditionalCompany "Newton"

New-GlobalAddressList -Name "Global Issac" -IncludedRecipients "AllRecipients" -conditionalCompany "Issac"

Update-GlobalAddressList "Global House"

Update-GlobalAddressList "Global Issac"

Update-GlobalAddressList "Global Newton"

$global=get-globalAddresslist "Global House"

Get-Recipient -RecipientPreviewFilter $global.RecipientFilter

 

$global=get-globalAddresslist "Global Newton"

Get-Recipient -RecipientPreviewFilter $global.RecipientFilter

 

$global=get-globalAddresslist "Global Issac"

Get-Recipient -RecipientPreviewFilter $global.RecipientFilter

Create the specific Offline Address List

new-AddressList -Name 'House List' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'House' -Container '\'

new-AddressList -Name 'Issac List' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Issac' -Container '\'

new-AddressList -Name 'Newton List' -IncludedRecipients 'AllRecipients' -ConditionalCompany 'Newton' -Container '\'

update-AddressList -Identity '\Newton List'

update-AddressList -Identity '\House List'

update-AddressList -Identity '\Issac List'

 

new-OfflineAddressBook -Name 'Newton OAB' -Server 'EX20071' -AddressLists '\Newton List' -PublicFolderDistributionEnabled $true -VirtualDirectories 'EX20071\OAB (Default Web Site)'

new-OfflineAddressBook -Name 'Issac OAB' -Server 'EX20071' -AddressLists '\Issac List' -PublicFolderDistributionEnabled $true -VirtualDirectories 'EX20071\OAB (Default Web Site)'

new-OfflineAddressBook -Name 'House OAB' -Server 'EX20071' -AddressLists '\House List' -PublicFolderDistributionEnabled $true -VirtualDirectories 'EX20071\OAB (Default Web Site)'

 

Set-OfflineAddressBook 'House OAB' -Schedule Always
Set-OfflineAddressBook 'Issac OAB' -Schedule Always
Set-OfflineAddressBook 'Newton OAB' -Schedule Always

Update-OfflineAddressBook 'House OAB'
Update-OfflineAddressBook 'Issac OAB'
Update-OfflineAddressBook 'Newton OAB'

Associate the Offline Address Book to the corresponding mailbox database

set-mailboxdatabase 'House' -OfflineAddressBook 'House OAB'

set-mailboxdatabase 'Issac' -OfflineAddressBook 'Issac OAB'

set-mailboxdatabase 'Newton' -OfflineAddressBook 'Newton OAB'

Remove the Default Global Address List from name resolution

ADSIEdit.msc utility

AdsiEdit1

AdsiEdit2

AdsiEdit3

The result for the globalAddressList attribute will be as follows:

AdsiEdit4

Remove-AddressList "All Users"
Remove-AddressList "All Groups"
Remove-AddressList "All Contacts"
Remove-AddressList "Public Folders"
Remove-AddressList "All Rooms"

Create a universal group UG_House under HOUSE OU; all users under HOUSE OU will be members of UG_House group.

Create a universal group UG_Issac under Issac OU; all users under Issac OU will be members of UG_Issac group;

Create a universal group UG_Newton under Newton OU; all users under Newton OU will be members of UG_Newton group;

adsiedit6

adsiedit7

adsiedit5

adsiedit8

 

adsiedit9

And then, the result will be Result.


A tweak:

For mult-hosting, it is possible that several people have the same name, e.g. House company has Rob Prince and Issac company has Rob Prince, too.

$password=Read-Host "Enter Password" -asSecureString

$firstName="Rob"
$lastName="Prince"
$company="Issac"
New-Mailbox -Name "$firstName $lastName $company" -Alias "$firstName.$lastName.$company" -OrganizationalUnit "work.com/Issac OU" -UserPrincipalName "$firstName.$lastName@Issac.com" -SamAccountName "$firstName.$lastName.I" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\Issac"


Set-User -Identity "$firstName.$lastname.$company" -Company $company

$firstName="Rob"
$lastName="Prince"
$company="House"
New-Mailbox -Name "$firstName $lastName $company" -Alias "$firstName.$lastName.$company" -OrganizationalUnit "work.com/House OU" -UserPrincipalName "$firstName.$lastName@House.com" -SamAccountName "$firstName.$lastName.H" -FirstName $firstName -initials "" -LastName $lastName -Password $password -Database "Ex20071\First Storage Group\House"


Set-User -Identity "$firstName.$lastname.$company" -Company $company

The -SamAccountName has the maximum length of 20. That is why I use only one letter instead of the company name.

Rob Prince at Issac company logs on to his computer and opens its outlook.

mailbox2

Rob Prince at House company logs on to his computer and opens its outlook.

mailbox3

 


Home