Si (-no [String]:: IsNullorEmpty($RoleDatacenterTestSpamDataFilePath)) { $transportService = get-Service "MSExchangeTransport" - ErrorAction SilentlyContinue $serviceState = 'NotInstalled' Si ($transportService - ne $null) { $serviceState = $transportService.Status }$testSpamDataFilePath = $RoleDatacenterTestSpamDataFilePath $exchangeServerInstallPath = (get-ItemProperty HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup).MsiInstallPath$currentDataFile = "TransportRoles\agents\Hygiene\SpamData\Current" de la ruta de unión $exchangeServerInstallPath Nuevo elemento - ruta de acceso $currentDataFile-tipo de "directorio" - ErrorAction SilentlyContinue Quitar elemento $currentDataFile\ *-recurse$targetDirectory = "TransportRoles\agents\Hygiene\SpamData\Default" de la ruta de unión $exchangeServerInstallPath Nuevo elemento - ruta de acceso $targetDirectory-tipo de "directorio" - ErrorAction SilentlyContinue Copy-Item $testSpamDataFilePath\ * $targetDirectory-ForceSi ($serviceState - eq "Running") { reinicio del servicio "MSExchangeTransport" } }
Si (($RoleDatacenterIsManagementForest - eq "True")- o ($RoleDatacenterFfoEnvironment - eq "True")) { Set-ThrottlingPolicyAssociation-Identity ...
Si (($RoleIsDatacenter - eq $false)- y ($RoleIsDatacenterDedicated - eq $false)) { inicio-SetupService - ServiceName MSExchangeEdgeSync; ...
Si (($server - eq $null)- y (($RoleIsDatacenter - eq $true)- o ($RoleIsDatacenterDedicated - eq $true))- y ($RoleAllRoles ...
Si ((get-service MSExchangeRepl | donde {$_.name - eq "MSExchangeRepl"})) { actualización MSExchangeReplService } Else { ...
Si (-no String]:: IsNullorEmpty($RoleDatacenterTestSpamDataFilePath)) { $transportService = get-Service "MSExchangeTransport" ...
Si (EC - $RoleHotmailMigration $true- o $ServicePlanSettings.Organization.AddOutlookAcceptedDomains) { Nuevo-AcceptedDomain-outlook.com ...
Si (EC - $RoleHotmailMigration $true- o $ServicePlanSettings.Organization.OpenDomainRoutingEnabled) { Set-Transportconfig ...
Si (Get-Service EventSystem |? {}$_.Nombre - eq 'EventSystem'}) { Set-Service EventSystem StartupType - automático Inicio-SetupService ...
Si (obtener servicio IISAdmin |? {}$_.Nombre - eq "IISAdmin"}) { Conjunto servicio IISAdmin - StartupType automática Inicio-SetupService ...