执行策略是否有解决方法?
PS C:\Users\thufir\Desktop>
PS C:\Users\thufir\Desktop> .\stock.ps1
.\stock.ps1 : File C:\Users\thufir\Desktop\stock.ps1 cannot be loaded because running scripts is disabled on this
system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\stock.ps1
+ ~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\thufir\Desktop>
我只是在寻找带有脚本的股票报价。是的,你可以通过复制/粘贴来运行一个脚本,但是......没有更好的东西吗?
政策如下:
PS C:\Users\thufir\Desktop>
PS C:\Users\thufir\Desktop> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
PS C:\Users\thufir\Desktop>
(不是我的机器。)
我正在寻找这个问题的反面。