Skip to content

Check automatic variable availability #1400

Open
@franklesniak

Description

@franklesniak

In comparing the Preference Variables documentation for PowerShell 6.x and newer:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-6

to the Preference Variables documentation for PowerShell 5.1:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_preference_variables?view=powershell-5.1

it seems that a number of Preference Variables were removed/deprecated from PowerShell. I just ran into this problem unexpectedly on a script when testing it on PowerShell 6.x.

To help with this problem, I would like the PSUseCompatibleCommands feature of PSScriptAnalyzer to flag the usage of deprecated Preference Variables and state that they are not compatible with PowerShell 6.0 and newer (on any platform including Windows).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions