if (-not String]::IsNullorEmpty($RoleDatacenterTestSpamDataFilePath)) { $transportService = Get-Service 'MSExchangeTransport' ...

if (-not [String]::IsNullorEmpty($RoleDatacenterTestSpamDataFilePath))                {                   $transportService = Get-Service 'MSExchangeTransport' -ErrorAction SilentlyContinue                   $serviceState = 'NotInstalled'                   if ($transportService -ne $null)                   {                      $serviceState = $transportService.Status                   }                   $testSpamDataFilePath = $RoleDatacenterTestSpamDataFilePath                   $exchangeServerInstallPath = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup).MsiInstallPath                   $currentDataFile = Join-Path $exchangeServerInstallPath "TransportRoles\agents\Hygiene\SpamData\Current"                   New-Item -Path $currentDataFile -type "directory" -ErrorAction SilentlyContinue                   Remove-Item $currentDataFile\* -recurse                   $targetDirectory = Join-Path $exchangeServerInstallPath "TransportRoles\agents\Hygiene\SpamData\Default"                   New-Item -Path $targetDirectory -type "directory" -ErrorAction SilentlyContinue                   Copy-Item $testSpamDataFilePath\* $targetDirectory -Force                   if ($serviceState -eq 'Running')                   {                      restart-service 'MSExchangeTransport'                   }                }
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
italiano
Italian
Português
Portuguese
Русский
Russian