Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
o-l-a-v opened this issue Jan 14, 2025 · 0 comments

Comments

@o-l-a-v
Copy link

o-l-a-v commented Jan 14, 2025

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
@o-l-a-v o-l-a-v changed the title PSSA says Install-Module is not compatible with desktop-5.1.14393.206-windows PSUseCompatibleCmdlets says Install-Module is not compatible with desktop-5.1.14393.206-windows Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant