加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

New-Object上的Windows RT Powershell(PermissionDenied)

发布时间:2020-12-13 21:19:48 所属栏目:Windows 来源:网络整理
导读:我试图在Power shell中为 Windows RT实例化一个对象,但不断收到以下错误. PS $foo = New-Object System.Security.Cryptography.SHA1ManagedNew-Object : Cannot create type. Only core types are supported in this language mode.At line:1 char:8+ $foo =
我试图在Power shell中为 Windows RT实例化一个对象,但不断收到以下错误.
PS > $foo = New-Object System.Security.Cryptography.SHA1Managed
New-Object : Cannot create type. Only core types are supported in this language mode.
At line:1 char:8
+ $foo = New-Object System.Security.Cryptography.SHA1Managed
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [New-Object],PSNotSupportedException
    + FullyQualifiedErrorId : CannotCreateTypeConstrainedLanguage,Microsoft.PowerShell.Commands.NewObjectCommand

我只花了最后三十分钟搞了一些非常沉重的谷歌,并且找不到任何与类似问题相近的东西,更不用说答案了.我希望我只需要配置一些东西;我担心Windows RT会附带一个残缺的Powershell版本.

有谁知道它是哪种情况?

是的,Windows RT附带了一个锁定版本的PowerShell – 它在ConstrainedLanguageMode中运行,它可以阻止大多数与.NET的交互(prop setters /方法调用).它还有一个有限的命令集IIRC.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读