у меня W7 и обнов конечно нет.
У меня Windows 7 SP1, и я устанавливал PowerShell 5.0 отдельно.
Код: Выделить всё
@echo off
chcp 1251 >nul
Powershell -File ./zdr.ps1
@echo start /wait Y|clip < Result.txtКод: Выделить всё
$aContent = Get-Clipboard -Format 'Text' -TextFormatType 'UnicodeText'
$aContent | ForEach-Object -Process {
$sLine = 'Здравствуйте, ' + $_.TrimEnd()
if(-not ($sLine.EndsWith('.') -or $sLine.EndsWith('!') -or $sLine.EndsWith('?'))) {
$sLine + (Get-Random '.', '!')
} else {
$sLine
}
} | Set-ClipboardКод: Выделить всё
powershell.exe -File "Путь\Имя.ps1"Код: Выделить всё
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File "Путь\Имя.ps1"
