我正在以管理员身份运行 Windows Server 2008,我尝试将 ExecutionPolicy 设置为 PowerShell v2 的 Remotesigned,如下所示:
Set-ExecutionPolicy RemoteSigned
Run Code Online (Sandbox Code Playgroud)
但我收到了这个错误:
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft
.PowerShell' is denied.
At line:1 char:20
+ Set-ExecutionPolicy <<<< RemoteSigned
+ CategoryInfo : NotSpecified: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyComma
nd
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题?
Active Directory 中的本地、全局和通用组之间的基本区别是什么?将用户和组分配给这些组时的最佳做法是什么?
如何使用dsquery查找特定用户的所有组(分配给用户的组)?
如何使用命令提示符列出 Windwos Server 2008 R2 上的环境变量?
windows-server-2008 command-line-interface environment-variables