Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 676 Bytes

UseCompatibleSyntax.md

File metadata and controls

31 lines (26 loc) · 676 Bytes
description ms.date ms.topic title
Use compatible syntax
06/28/2023
reference
UseCompatibleSyntax

UseCompatibleSyntax

Severity Level: Warning

Description

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

It cannot identify syntax elements incompatible with PowerShell 3 or 4 when run from those PowerShell versions because they aren't able to parse the incompatible syntaxes.

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