5
我想在Windows RT的Powershell中實例化一個對象,但不斷收到以下錯誤。新的對象上的Windows RT Powershell(PermissionDenied)
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
我剛剛花了近30分鐘從事一些相當沉重的谷歌福,無法找到任何甚至接近了類似的問題,更不用說回答。我的希望是我只需要配置一些東西;我的擔心是Windows RT帶有一個殘缺版本的Powershell。
有誰知道它是哪種情況?
正如Keith提到的,在Windows RT上PowerShell以受限語言模式運行。您可以在http://technet.microsoft.com/en-us/library/dn433292.aspx上閱讀有關它的更多信息以及允許哪些類型的操作 – deadlydog