Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 771 Bytes

UseCompatibleSyntax.md

File metadata and controls

29 lines (22 loc) · 771 Bytes

Pattern: Use of incompatible syntax with targeted PowerShell version

Issue: -

Description

This rule identifies syntax elements that are incompatible with targeted PowerShell versions.

It cannot identify syntax elements incompatible with PowerShell 3/4 from PowerShell 3/4 due to those PowerShell versions not being able to parse the incompatible syntaxes.

@{
    Rules = @{
        PSUseCompatibleSyntax = @{
            Enable = $true
            TargetVersions = @(
                "6.0",
                "5.1",
                "4.0"
            )
        }
    }
}

Further Reading