🏠 | 💻 IT | Windows |

Power Shell

Посмотреть конец файла в PowerShell (аналог tail)
Создать новый файл в PowerShell (аналог touch)
Проверить контрольную сумму файла в PowerShell (аналог md5sum)
Set-ExecutionPolicy Unrestricted -Force

Set-ExecutionPolicy Unrestricted -Force

Вы пробуете выполнить ваш скритп

./your_script.ps1

И получаете

.\your_script.ps1 : File C:\Users\Andrei\your_script.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + .\your_script.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

Нужно зайти в PowerShell в режиме администратора и выполнить

Set-ExecutionPolicy Unrestricted -Force

И execute ещё раз

./your_script.ps1

Если Вы не можете запустить PowerShell в режиме администратора. Например, если Вы пользуетесь терминалом в Visual Studio Code

Выполните

Set-ExecutionPolicy -Scope CurrentUser Unrestricted -Force

Related Articles:

Loudness Equalization

tail analog in PowerShell

Windows Firewall

Drivers in Windows

Developer Mode in Windows 10

BASH in Windows 10

Telnet in Windows 10

PATH system varialbe

Windows Installation on gpt disk

Share in social media: