I haven’t used a v4 extension yet and saw this WinGet extension and was excited to try it. When testing out this extension to attempt installing “Microsoft.WindowsTerminal” I am getting a strange error in the log.
The command I am using is:
Invoke-ADTWinGetOperation -Id Microsoft.WindowsTerminal -DeployMode Silent
My question is, am I doing something wrong with how I am using this module? or is this a bug?
Here are the errors from the Log the extension creates:
[Install] :: Installer failed with exit code: 0x80070032 : The request is not supported.
[Install] :: Failed to install the specified WinGet package.
Error Record:
-------------
Message : Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format."
InnerException : System.Management.Automation.PSInvalidCastException: Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format." ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
--- End of inner exception stack trace ---
at System.Management.Automation.LanguagePrimitives.ConvertStringToInteger(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
FullyQualifiedErrorId : InvalidCastFromStringToInteger,Install-ADTWinGetPackage
ScriptStackTrace : at Invoke-ADTWinGetDeploymentOperation<End>, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 1925
at Install-ADTWinGetPackage<Process>, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3032
at Install-ADTDeployment, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3214
at Invoke-ADTWinGetOperation, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3303
at Install-ADTDeployment, C:\Resources\Invoke-AppDeployToolkit.ps1: line 177
at <ScriptBlock>, C:\Resources\Invoke-AppDeployToolkit.ps1: line 334
PositionMessage : At C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1:3214 char:17
+ ... $null = & $Script:CommandTable.'Install-ADTWinGetPackage' -Id $Id ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error Inner Exception(s):
-------------------------
Message : Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format."
InnerException : System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message : Input string was not in a correct format.
[Install] :: Error Record:
-------------
Message : Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format."
InnerException : System.Management.Automation.PSInvalidCastException: Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format." ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
--- End of inner exception stack trace ---
at System.Management.Automation.LanguagePrimitives.ConvertStringToInteger(Object valueToConvert, Type resultType, Boolean recursion, PSObject originalValueToConvert, IFormatProvider formatProvider, TypeTable backupTable)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
FullyQualifiedErrorId : InvalidCastFromStringToInteger,Install-ADTWinGetPackage
ScriptStackTrace : at Invoke-ADTWinGetDeploymentOperation<End>, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 1925
at Install-ADTWinGetPackage<Process>, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3032
at Install-ADTDeployment, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3214
at Invoke-ADTWinGetOperation, C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1: line 3303
at Install-ADTDeployment, C:\Resources\Invoke-AppDeployToolkit.ps1: line 177
at <ScriptBlock>, C:\Resources\Invoke-AppDeployToolkit.ps1: line 334
PositionMessage : At C:\Resources\PSAppDeployToolkit.WinGet\PSAppDeployToolkit.WinGet.psm1:3214 char:17
+ ... $null = & $Script:CommandTable.'Install-ADTWinGetPackage' -Id $Id ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error Inner Exception(s):
-------------------------
Message : Cannot convert value "Installer failed with exit code: 0x80070032 : The request is not supported." to type "System.Int32". Error: "Input string was not in a correct format."
InnerException : System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message : Input string was not in a correct format.
[Finalization] :: [WindowsTerminal_1.22.11141.0] install completed with exit code [60001].