3
Vote

InformationAction and InformationVariable are not considered CommonParameters

description

InformationVariable and InformationAction should not be showing up in my list of parameters since they are common parameters.

https://technet.microsoft.com/en-us/library/hh847884.aspx

comments

blhoang wrote Jun 7, 2016 at 7:08 PM

I don't use SVN.. The easy change is in line 276 of CmdletHelpEditor/API/BaseClasses/CmdletObject.cs
Adding informationaction and informationvariable to the exclude list will fix this issue.
        List<String> exclude = new List<String> {
            "verbose", "debug", "erroraction", "errorvariable", "outvariable", "outbuffer", "informationaction", "informationvariable",
            "warningvariable", "warningaction", "pipelinevariable"
        };
Then you just need to update the HtmlProcessor.cs
        SB.Append("<p style=\"margin-left: 40px;\">This cmdlet supports the common parameters: Verbose, Debug,<br />" + n);
        SB.Append("ErrorAction, ErrorVariable, InformationAction, InformationVariable, WarningAction, WarningVariable,<br />" + n);
Thanks

cojms1 wrote Jun 15, 2016 at 1:38 PM

Thanks for the pointers @bilhoang. I've also found that you need to ensure that lines 302 and 303 in CmdletObject.cs are set as follows to avoid the parameters being displayed in HTML view:
                "verbose","debug","erroraction","warningaction","errorvariable","warningvariable",
                "outvariable","outbuffer", "pipelinevariable", "informationaction", "informationvariable"

wrote Jun 24, 2016 at 12:31 AM

wrote Nov 24, 2016 at 5:37 PM