Если (-не строка]:: IsNullorEmpty($RoleDatacenterTestSpamDataFilePath)) { $transportService = "MSExchangeTransport" get-Service ...

Если (-не [строка]:: IsNullorEmpty($RoleDatacenterTestSpamDataFilePath))                {                   $transportService = "MSExchangeTransport" get-Service - ErrorAction SilentlyContinue                   $serviceState = "NotInstalled"                   Если ($transportService - ne $null)                   {                      $serviceState = $transportService.Status                   }$testSpamDataFilePath = $RoleDatacenterTestSpamDataFilePath                   $exchangeServerInstallPath = (HKLM:\SOFTWARE\Microsoft\ExchangeServer\v15\Setup get-ItemProperty).MsiInstallPath$currentDataFile = "TransportRoles\agents\Hygiene\SpamData\Current" join-Path $exchangeServerInstallPath                   Нового элемента - путь $currentDataFile-типа "каталог" - ErrorAction SilentlyContinue                   Remove-Item $currentDataFile\ *-recurse$targetDirectory = "TransportRoles\agents\Hygiene\SpamData\Default" join-Path $exchangeServerInstallPath                   Нового элемента - путь $targetDirectory-типа "каталог" - ErrorAction SilentlyContinue                   Copy-Item $testSpamDataFilePath\ * $targetDirectory-силаЕсли ($serviceState - eq "Запуск")                   {                      перезапуск службы «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