function global:TranslitToLAT {
param([string]$inString)
$Translit_To_LAT = @{
[char]'а' = "a"
[char]'А' = "a"
[char]'б' = "b"
[char]'Б' = "b"
[char]'в' = "v"
[char]'В' = "v"
[char]'г' = "g"
[char]'Г' = "g"
[char]'д' = "d"
[char]'Д' = "d"
[char]'е' = "e"
[char]'Е' = "e"
[char]'ё' = "e"
[char]'Ё' = "e"
[char]'ж' = "zh"
[char]'Ж' = "zh"
[char]'з' = "z"
[char]'З' = "z"
[char]'и' = "i"
[char]'И' = "i"
[char]'й' = "y"
[char]'Й' = "y"
[char]'к' = "k"
[char]'К' = "k"
[char]'л' = "l"
[char]'Л' = "l"
[char]'м' = "m"
[char]'М' = "m"
[char]'н' = "n"
[char]'Н' = "n"
[char]'о' = "o"
[char]'О' = "o"
[char]'п' = "p"
[char]'П' = "p"
[char]'р' = "r"
[char]'Р' = "r"
[char]'с' = "s"
[char]'С' = "s"
[char]'т' = "t"
[char]'Т' = "t"
[char]'у' = "u"
[char]'У' = "u"
[char]'ф' = "f"
[char]'Ф' = "f"
[char]'х' = "h"
[char]'Х' = "h"
[char]'ц' = "ts"
[char]'Ц' = "ts"
[char]'ч' = "ch"
[char]'Ч' = "ch"
[char]'ш' = "sh"
[char]'Ш' = "sh"
[char]'щ' = "sch"
[char]'Щ' = "sch"
[char]'ъ' = "" # "``"
[char]'Ъ' = "" # "``"
[char]'ы' = "y" # "y`"
[char]'Ы' = "y" # "Y`"
[char]'ь' = "" # "`"
[char]'Ь' = "" # "`"
[char]'э' = "e" # "e`"
[char]'Э' = "e" # "E`"
[char]'ю' = "yu"
[char]'Ю' = "yu"
[char]'я' = "ya"
[char]'Я' = "ya"
[char]' ' = "_"
}
$outChars = ""
$TwoLetter_To_LAT = @{
[string]'ъи' = 'yi'
[string]'ьи' = 'yi'
[string]'ье' = 'ye'
[string]'ъe' = 'ye'
}
$TwoLetter_To_LAT.GetEnumerator().name | % {
$inString = $inString.Replace($_, $TwoLetter_To_LAT.Item($_))
}
foreach ($c in $inChars = $inString.ToCharArray()) {
if ($Translit_To_LAT[$c] -cne $Null )
{ $outChars += $Translit_To_LAT[$c] }
else
{ $outChars += $c }
}
Write-Output $outChars
}
$text = Read-Host "Введите текст"
$log = TranslitToLAT $text
$log
Disconnect- Ends the SMTP connection between the sending server and the Edge Transport server without generating an NDR., но не уверен что подходит оно.
Погуглил нашел похожий вопрос https://serverfault.com/questions/455998/smb2-traf..., если я правильно понял там была проблема из за квот которые установлены для шар на сервере. Неужели и правда может быть такая проблема из за установленных квот ?