如何让我的 PowerShell 脚本执行?
当我运行我的脚本时,我得到了错误:
File cannot be loaded because the execution of scripts is disabled on this system
你能帮我让我的脚本运行吗?
set-executionpolicy unrestricted
#Set-ExecutionPolicy RemoteSigned
$target=[IO.File]::ReadAllText(".\usermenuTest1.4d")
$output=[IO.File]::ReadAllText(".\usermenuTest2.4d")
($output -replace $target) | Set-Content "usermenuTest2.4d.new"
Start-Sleep -s 10