Skip to content

Use StaticParameterBinder for AvoidDeprecatedCommands #2

@iRon7

Description

@iRon7

Thanks for sharing your rules.
Our company is preparing to move to PowerShell 7 as well (I got your name from a college that met you in Malmo).
I was about to write a similar rule with a configuration list as you did for AvoidDeprecatedCommands but I am now considering to just use yours.
Anyways, at the moment I have several individual rules to avoid specific commands myself and with that wanted to better resolve the command and it parameters. Fyi, there is in fact a .net automation StaticParameterBinder.BindCommand class to resolve the command line, see: https://stackoverflow.com/a/79634016/1701026

Maybe something you might want to use for the concerned AvoidDeprecatedCommands rule...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions