Skip to content

PSUseCompatibleCmdlets says Install-Module is not compatible with desktop-5.1.14393.206-windows #2052

Open
@o-l-a-v

Description

@o-l-a-v

Steps to reproduce

Invoke-ScriptAnalyzer -ScriptDefinition 'Install-Module -Name ''Foo''' -Settings @{
    Rules = @{
        PSUseCompatibleCmdlets = @{
            Compatibility = @('desktop-5.1.14393.206-windows')
        }
    }
} | Format-List -Property '*'

Expected behavior


Actual behavior

Line                 : 1
Column               : 1
Message              : 'Install-Module' is not compatible with PowerShell edition 'desktop', version '5.1.14393.206' and OS 'windows'
Extent               : Install-Module
RuleName             : PSUseCompatibleCmdlets
Severity             : Warning
ScriptName           : 
ScriptPath           : 
RuleSuppressionID    : 
SuggestedCorrections : 
IsSuppressed         : False

If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *

Environment data

  • PowerShell v7.4.6 x64 on Windows 11 24H2 x64
  • PSScriptAnalyzer v1.23.0

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