Install-Module for PSScriptAnalyzer Occasionally failing for version 1.23.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- tooling
Research direction
Start by running the reported PowerShell Install-Module command for PSScriptAnalyzer 1.23.0 repeatedly, then capture the missing $PSVersionTable data and full error details. Compare successful and failed attempts to determine whether the intermittent PowerShell Gallery download failure is reproducible; done means identifying a reliable cause and a verified installation outcome.
Written by the indexing model from the issue text.
Description
Steps to reproduce
Run the command
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.23.0 -Force -Scope CurrentUser
Expected behavior
The PSScriptAnalyzer module should install without issue.
Actual behavior
Occasionally I'm hitting the following exception (occurs roughly 1 out of every 20 times):
WARNING: Source Location
'https://www.powershellgallery.com/api/v2/package/PSScriptAnalyzer/1.23.0' is
not valid.
PackageManagement\Install-Package : Package 'PSScriptAnalyzer' failed to
download.
At C:\Program
Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809
char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\Users\Contai...tAnalyze
r.nupkg:String) [Install-Package], Exception
+ FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerSh
ell.PackageManagement.Cmdlets.InstallPackage
If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *
Environment data
> $PSVersionTable
TBD - need to get this info injected into our build pipeline where we're seeing this issue (not really an issue seen locally)
> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }
N/A (module hasn't been installed yet)
- 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 ·