Skip to content

Install-DscResourceAddOn fails in ISE v5 #7

@bcdady

Description

@bcdady

Hi @inchara, I just tried Install-DscResourceAddOn in ISE-Preview, but it seems something has changed with how it expects/checks the parameters of VerticalAddOnTools.Add(), The following error message references line 22, which in my module contains the following line:

$psISE.CurrentPowerShellTab.VerticalAddOnTools.Add(‘Show-DscResource’, [Show_DscResources.DscResourceAddOn], $true)

Copy of console output:

PS .\> Install-DscResourceAddOn
Thank you for installing the Show-DscResource add-on.
Please wait a few seconds while ISE loads all the resources ...
(It's a one time wait).Thanks!
[comment: the following is the red error text]
Exception calling "Add" with "3" argument(s): "Cannot create element because an exception occurred with the message: 

Exception setting "Module": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Management.Automation.PSModuleInfo".".
Parameter name: controlType"
At C:\[$path]\WindowsPowerShell\Modules\ShowDscResource\ShowDscResourceModule.psm1:22 char:9
+         $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add(‘Show-DscR ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException

[comment: end of red error text]
Installed the add-on successfully! 

$Host.Version:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      0      10586  117     

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions