if (($RoleIsDatacenter -ne $true) -and ($RoleIsDatacenterDedicated -ne $true)) { if (test-ExchangeServersWriteAccess -DomainController $RoleDomainController -ErrorAction SilentlyContinue) { # upgrade the discovery mailboxes to R5 version, this will fix the RecipientDisplayType property of the discovery mailbox which was wrong in R4. get-mailbox -RecipientTypeDetails DiscoveryMailbox -DomainController $RoleDomainController | where {$_.IsValid -eq $false} | set-mailbox -DomainController $RoleDomainController $name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName; $dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName; $mbxs = @( get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1 ); if ( $mbxs.length -eq 0) { $dbs = @(get-MailboxDatabase -Server:$RoleFqdnOrName -DomainController $RoleDomainController); if($dbs.Length -ne 0) { $mbxUser = @(get-user -Filter {name -eq $name} -IgnoreDefaultScope -ResultSize 1); if ($mbxUser.Length -ne 0) { enable-mailbox -Discovery -identity $mbxUser[0] -DisplayName $dispname -database $dbs[0].Identity; } } } } else { write-exchangesetuplog -info "Skipping creating Discovery Search Mailbox because of insufficient permission." } }
if (($RoleDatacenterIsManagementForest -eq "True") -or ($RoleDatacenterFfoEnvironment -eq "True")) { $ViewPointServiceAccount ...
if (($RoleDatacenterIsManagementForest -eq "True") -or ($RoleDatacenterFfoEnvironment -eq "True")) { Set-ThrottlingPolicyAssociation ...
if (($RoleDatacenterIsManagementForest -eq "True") -or ($RoleDatacenterFfoEnvironment -eq "True")) { Set-User "ViewPointServiceAccount" ...
if (($RoleIsDatacenter -eq $false) -and ($RoleIsDatacenterDedicated -eq $false)) { start-SetupService -ServiceName MSExchangeEdgeSync; ...
if (($RoleIsDatacenter -ne $true) -and ($RoleIsDatacenterDedicated -ne $true)) { if (test-ExchangeServersWriteAccess -DomainController ...
if (($server -eq $null) -and (($RoleIsDatacenter -eq $true) -or ($RoleIsDatacenterDedicated -eq $true)) -and ($RoleAllRoles ...
if (-not String]::IsNullorEmpty($RoleDatacenterTestSpamDataFilePath)) { $transportService = Get-Service 'MSExchangeTransport' ...
if (Get-Service EventSystem* | ?{$_.Name -eq 'EventSystem'}) { Set-Service EventSystem -StartupType Automatic Start-SetupService ...
if (Get-Service IISAdmin* | ?{$_.Name -eq 'IISAdmin'}) { Set-Service IISAdmin -StartupType Automatic Start-SetupService -ServiceName ...