Open
Description
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