The app wont open.
I ran the command: iwr -useb https://christitus.com/win | iex and it says this: iex : At line:7961 char:5
-
class WingetFailedInstall : Exception { -
~~~~~
Class keyword is not allowed in ConstrainedLanguage mode. At line:7961 char:11
-
class WingetFailedInstall : Exception { -
~~~~~~~~~~~~~~~~~~~
Unexpected token 'WingetFailedInstall' in expression or statement. At line:7967 char:5
-
class ChocoFailedInstall : Exception { -
~~~~~
Class keyword is not allowed in ConstrainedLanguage mode. At line:7967 char:11
-
class ChocoFailedInstall : Exception { -
~~~~~~~~~~~~~~~~~~
Unexpected token 'ChocoFailedInstall' in expression or statement. At line:7973 char:5
-
class GenericException : Exception { -
~~~~~
Class keyword is not allowed in ConstrainedLanguage mode. At line:7973 char:11
-
class GenericException : Exception { -
~~~~~~~~~~~~~~~~
Unexpected token 'GenericException' in expression or statement. At line:1 char:26
- irm christitus.com/win | iex
-
~~~- CategoryInfo : ParserError: (:) [Invoke-Expression], ParseException
- FullyQualifiedErrorId : ClassesNotAllowedInConstrainedLanguage,Microsoft.PowerShell.Commands.InvokeExpressionCom mand
Steps to reproduce the behavior:
- Open windows powershell
- Run as administrator
- run this command iwr -useb https://christitus.com/win | iex
- error.
It was suppose to open the app.
I believe what you're dealing with is relevant to: https://devblogs.microsoft.com/powershell/powershell-constrained-language-mode/
PowerShell Constrained Language is a [language mode](https://devblogs.microsoft.com/powershell/a-comparison-of-shell-and-scripting-language-security/) of PowerShell designed to support day-to-day administrative tasks, yet restrict access to sensitive language elements that can be used to invoke arbitrary Windows APIs.
I don't believe this is a direct issue with WinUtil.