`PSUseCompatibleCmdlets` says `Install-Module` is not compatible with `desktop-5.1.14393.206-windows`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the supplied PowerShell reproduction and inspect the PSUseCompatibleCmdlets rule and its compatibility lookup for Install-Module. Verify the command's reported compatibility result and determine the intended result for the desktop-5.1.14393.206-windows target; the issue is resolved when the rule reports the correct result and the reproduction is covered by a test.
Written by the indexing model from the issue text.
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
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 415
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/PSScriptAnalyzer
-
Up-for-Grabs
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
PowerShell/PSScriptAnalyzer#2217 · 1 comment ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
PowerShell/PSScriptAnalyzer#2216 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
PowerShell/PSScriptAnalyzer#2210 ·
All issues in PowerShell/PSScriptAnalyzer
Similar issues
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#63292 · 3 comments · 1 reaction ·
-
Issue-Enhancement Needs-Triage
Difficulty 1/5 Under an hour Newbie friendliness 86/100
PowerShell/PowerShell#28061 · 2 reactions ·
-
dependencies needs-team-triage server-Azure.Mcp
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
aspnet-core/svc aspnetcore-signalr/subsvc doc-enhancement Pri2 SignalR
Difficulty 1/5 Under an hour Newbie friendliness 88/100
dotnet/AspNetCore.Docs#37729 ·