GithubHelp home page GithubHelp logo

powershellgallery's Introduction

PowerShell Gallery

The PowerShell Gallery is a repository used by Microsoft, partners, and the community to share PowerShell code. This Github repo is primarily reserved for future sharing of elements of the PowerShell Gallery.

The PowerShell Gallery status is available here

Code of Conduct

Please see our Code of Conduct before participating in this project.

Security Policy

For any security issues, please see our Security Policy.

powershellgallery's People

Contributors

adityapatwardhan avatar alerickson avatar andyleejordan avatar bmanikm avatar edyoung avatar stevel-msft avatar sydneyhsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powershellgallery's Issues

Show nuget package location link in UI

When deploying Azure automation with custom modules, the ARM template supports a URL for the package.
Until now, i need to query this out by script.

Would be great if the gallery UI would show this URL so i can simply copy/paste it into my ARM template.

R.

Problem with PSYAML

This code I published a while back called PSYAML was used without my permission for the module PSYAML on this site. I wouldn't mind about this if it worked properly and if I had access to it to keep it up to date and working. It doesn't, and I don't. I have tried on several times to message the person credited with the copyright to alert him that the code needs mending, but your mail system seems to be broken. I keep getting the message that I failed 'Recapcha'.

Markdown support in Release Notes

I noticed that many packages (including those from Microsoft) use Markdown in the Release Notes section, but PS Gallery does not do any Markdown processing. Some other NuGet-based galleries (e.g. Chocolatey) support Markdown in at least the Release Notes and Description sections.

Full markdown support is probably not necessary, but bulleted lists, italic and bold would be a good start.

Azure China?

how do we deploy the module to Azure in China?

No way to sign in with different account

Our company uses Azure ADFS integration, but I use a personal account for the PowerShell Gallery. When I go to https://www.powershellgallery.com/users/account/LogOn and choose to Sign in with Microsoft it does not prompt me for which account I want to sign in as. Instead it tries to sign me in using my work email address, and when it cannot find an associated account it asks me to provide a username so it can create one. There does not seem to be any way for me to choose to sign in using a different email address; namely my personal one. Many other Microsoft sites prompt which account I want to sign in as before attempting to sign me in. The PowerShell Gallery website seems to be missing this functionality.

I was able to fix this by going to another Microsoft website (visualstudio.com) and signing out of my work account from there. Then when attempting to sign in to the PowerShell Gallery website it prompted me for which address I wanted to use. It seems silly that I need to go to some other website to do this though and cannot do it from the PowerShell Gallery website.

Unable to add new owner (owner not found)

I'm trying to add an owner to a package we have published already. When I type in the username (email address) of the intended new owner, I receive an error:

Owner not found

Error on Install-Module: failed to be installed because: End of Central Directory record could not be found

FI'm not sure what's up here. I published a module a little bit ago. (PSVagrantCloud) When I try to install the module fresh, I receive the following error:

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PackageManagement\Install-Package : Package 'PSVagrantCloud' failed to be installed because: End of Central Directory
record could not be found.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (PSVagrantCloud:String) [Install-Package], Exception
    + FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement
   .Cmdlets.InstallPackage

I've tried the following:

  1. PowerShell 5.1 fails (Windows 10)
  2. PowerShell 6.1.0 succeeds (Windows 10)
  3. PowerShell 6.1.2 fails (Windows 10)
  4. PowerShell 6.1.2 fails (Ubuntu 18.04)
  5. Using Find-Module | Save-Module fails:
WARNING: Package 'PSVagrantCloud' failed to be installed because: End of Central Directory record could not be found.
WARNING: Package 'PSVagrantCloud' failed to install.
PackageManagement\Save-Package : Unable to save the module 'PSVagrantCloud'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1598 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Except
   ion
    + FullyQualifiedErrorId : ProviderFailToDownloadFile,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage
  1. Attempts to specify a version, using the -RequiredVersion fails.

I have not attempted to republish, but I fail to see what would be different here. Some research indicates an issue with the module and unzipping the data.

Full verbose output:

VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSVagrantCloud'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSVagrantCloud'.
VERBOSE: Performing the operation "Install-Module" on target "Version '1.0' of module 'PSVagrantCloud'".
VERBOSE: The installation scope is specified to be 'AllUsers'.
VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'PSVagrantCloud' with version '1.0' from the repository
'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSVagrantCloud'' for ''.
VERBOSE: InstallPackage' - name='PSVagrantCloud',
version='1.0',destination='C:\Users\Steve\AppData\Local\Temp\1533484036'
VERBOSE: DownloadPackage' - name='PSVagrantCloud',
version='1.0',destination='C:\Users\Steve\AppData\Local\Temp\1533484036\PSVagrantCloud\PSVagrantCloud.nupkg',
uri='https://www.powershellgallery.com/api/v2/package/PSVagrantCloud/1.0.0'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSVagrantCloud/1.0.0'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSVagrantCloud/1.0.0'.
VERBOSE: Completed downloading 'PSVagrantCloud'.
VERBOSE: Hash for package 'PSVagrantCloud' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='PSVagrantCloud',
version='1.0',destination='C:\Users\Steve\AppData\Local\Temp\1533484036'
PackageManagement\Install-Package : Package 'PSVagrantCloud' failed to be installed because: End of Central Directory
record could not be found.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (PSVagrantCloud:String) [Install-Package], Exception
    + FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement
   .Cmdlets.InstallPackage

Preview banners are missing the links

Issue

Preview links are missing on the PowerShell gallery which may annoy some of the web savvy users who assume that links are clickable and you don't need to copy paste them :)

Current preview banner at https://www.powershellgallery.com/

<div id="service-alert" style="display: block;">
    <div class="banner-warning">
        <p>Try the Preview for the PowerShell Gallery UI at https://preview.powershellgallery.com /p>
    </div>
</div>

Expected

Links are expected to be links with an href

<div id="service-alert" style="display: block;">
    <div class="banner-warning">
        <p>Try the Preview for the PowerShell Gallery UI at
            <a href="https://preview.powershellgallery.com/">https://preview.powershellgallery.com</a>
        </p>
    </div>
</div>

Similarly the preview itself is missing the link to the FAQ

Current preview banner without link

This is a Preview of the new PowerShell Gallery UI, see FAQ link for details

Expected

<span>This is a Preview of the new PowerShell Gallery UI, see <a href="https://aka.ms/PSGalleryPreviewFAQ">FAQ</a> link for details</span>

ReleaseNotes not showing up after publishing module

We published a new version of our module and included release notes in the publish-module command. Those notes are not showing up associated with the module. Is this a known issue/is there a good workaround?

Publish an item as unlisted

I'd like to request a feature to programmatically publish an item in the gallery as "Hidden" or a way to programmatically toggle the 'hidden' attribute for a given release/version .

An example: An update is published to the gallery that passed all initial tests but once in the gallery we found an issue with installing the module on some machines due to a code signing certificate problem.

In the future it would be nice to be able to publish as โ€œhiddenโ€ and test module installation from the gallery and toggle the visibility once we confirm users 'in the wild' can install that specific version.

Thanks!

Users vs. Download counts: useful metrics and what to do about it...

We (the PowerShell community) need to have a conversation about how the current default sorting algorithms in the gallery affect the development community (module authors) and user's perceptions of popularity and quality.

Currently the PowerShell gallery highlights the "Top" modules by download count:
image

This table is ruled by modules which are needed in Builds, CI, test automation, and to a lesser degree, automation of the environments needed for those activities. Modules which get picked up and used in builds will float straight to the top.

The system is inherently exploitable: all you need to do is set up a build on an Azure Pipeline that runs on a schedule and downloads a module each time ... the gallery doesn't care that all the downloads come from one build server because in fact, most of the downloads do come from a relatively small number of servers.

The problem with this is that the community's perception of module popularity is being governed not by how many users a module has, or how useful it is, or how many commands it has that people use every day, but by whether or not it has a command that is useful in builds, continuous integration, or continuous deployment/testing.

Modules that aren't used in CI processes are simply never going to show up in the "Top" module list, and are handicapped relative to other modules in search results as well (although the default search is sorted by "relevance", it's not clear what the "popularity" metric is using #31).

As a consequence, we are strongly encouraging PowerShell module authors to focus on CI modules and management installs and testing, rather than on management of production resources -- and to produce modules that work from build servers and required installation oneach server, rather than modules that work from your desktop....

What else do you see?

No validation of version number mismatches between .nuspec and .psd1

I'm running into more and more packages where the version number in the .nuspec file does not match the version number in the .psd1 of the module. This is bad.

A small handful of examples:

This causes problems with software like ProGet as I guess ProGet can only depend upon the .nuspec version number as it applies to the entire NuGet package.

I don't know whether ProGet plays a specific part in this problem but I don't believe that ProGet reading the package version number from the .nuspec file is unreasonable.

As a result, when a package is installed from a ProGet repository onto a Windows machine, it ends up in the wrong location, e.g.

C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\12.2.0

... where the .psd1 actually says 12.2.0.0. Then PowerShell refuses to load the module because it believes the manifest is incorrect.

I feel that it is a bug that PowerShellGallery allows packages to be uploaded with obvious version mismatches in the metadata like this.

It should either prevent the upload with a very clear warning or update the .nuspec file to match the version as specified in the .psd1 file.

Filtering isnt persistant across page scrolling

If you chose a filter it works on the first page but once you begin scrolling across pages of results the filters go away.

If you select a filter it should remain filtered as you browse pages.

Publish-PSArtifactUtility error gives misleading information (error code 500)

Error gives no clues that the real reason behind below mentioned error, is that if you put text that begins with . in the Release notes.

For example:

"
.RELEASENOTES
Added feature to accept sourcedirectory+file and destinationdirectory+file as arguments.
If they are omitted, script will ask sourcefile.
Examples:
.\O365_Unified_Auditlog_parser.ps1 -sourcefile "c:\dddd\sourcefile.csv" -destinationfile "c:\dddd\destinationfile.csv"
.\O365_Unified_Auditlog_parser.ps1 -sourcefile ".\AuditLog_2019-04-22_2019-04-30.csv" -destinationfile ".\AuditLog_2019-04-22_2019-04-30_parsered.csv"
#>

Error:
Publish-PSArtifactUtility : Failed to publish script 'O365_Unified_Auditlog_parser': 'Response status code does not indicate success: 500 (Item has already been added. Key in dictionary: '\O365_Unified_Auditlog_parser.ps1' Key being added: '\O365_Unified_Auditlog_parse
r.ps1').
'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.2\PSModule.psm1:10952 char:17

  • ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : FailedToPublishTheScript,Publish-PSArtifactUtility

Documentation link on Item Page is confusing

The new description of the documentation link is better. Most customers expect that to link to go to documentation for the Item.

image

Question - How is this documentation link any different than the documentation link in the page header?

Suggestion - Keep the documentation link but make it clearer that is documentation for the deployment method selected. Also, make that link context sensitive. For example:

Publishing module that has tags with spaces claims module is published when in fact it's not

Module doesn't check if Tags have spaces. Therefore if you define something like this in .psd1

Tags       = @('documentation', 'windows', 'word', 'workstation', 'activedirectory', 'ad', 'excel', 'sql', 'azure', 'azure ad', 'exchange', 'office365', 'aws')

It will display this

VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/items/psscript/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/items/psscript/FindPackagesById()?id='PSWinDocumentation'' for ''.
VERBOSE: Total package yield:'0' for the specified package 'PSWinDocumentation'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSWinDocumentation'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSWinDocumentation'.
VERBOSE: Performing the operation "Publish-Module" on target "Version '0.1.3' of module 'PSWinDocumentation'".
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSWriteWord'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSWriteWord'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSWriteExcel'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSWriteExcel'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSWriteColor'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSWriteColor'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSSharedGoods'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSSharedGoods'.
VERBOSE: Successfully published module 'PSWinDocumentation' to the module publish location 'https://www.powershellgallery.com/api/v2/package/'. Please allow few minutes for 'PSWinDocumentation' to show up in the search results.

But in fact it's not really true. It's not published. If you remove space it will work.

Can't access 'Account Settings'

I noticed some odd things with my PowerShell Gallery Account today.

I can't:

  • Access Account Settings, it returns 500 - Internal Server Error

I can:

  • Authenticate with my outlook account (2FA)
  • manage my packages, manage API keys etc..
  • Repro in Incognito

Also I noticed a different email address when i click on my profile ๐Ÿ˜ (mine is [email protected])
image

I don't think my account got compromised.

Anybody can repro ?

Publishing modules based on other modules in preview

I wanted to publish a module as Preview based on another Preview module. It doesn't seem to see Preview modules.

When I tried changing 0.7.2 to 1.0.0 it fails. I see no other option to add Preview5 for example as a required module.

    RequiredModules = @{
        ModuleVersion = '0.7.2'
        ModuleName = 'PSWriteWord'
        GUID = '6314c78a-d011-4489-b462-91b05ec6a5c4'
    }, @{
        ModuleVersion = '0.1'
        ModuleName = 'PSWriteExcel'
        GUID = '82232c6a-27f1-435d-a496-929f7221334b'
    }, @{
        ModuleVersion = '0.0.77'
        ModuleName = 'PSSharedGoods'
        GUID = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
    }, @{
        ModuleVersion = '0.0.7'
        ModuleName = 'PSWinDocumentation.AD'
        GUID = 'a46f9775-04d2-4423-9631-01cfda42b95d'
    }, @{
        ModuleVersion = '0.0.3'
        ModuleName = 'PSWinDocumentation.AWS'
        GUID = 'b3c23202-740d-4f7b-a9d7-bd87063381cc'
    }, @{
        ModuleVersion = '0.0.1'
        ModuleName = 'PSWinDocumentation.O365'
        GUID = '71ea1419-d950-444b-83c9-c579de74962a'
    }

Insufficient Information returned when publishing fails

A dbachecks release to the gallery via Azure DevOps Pipeline (but also replicated locally) failed and the information returned was

VERBOSE: info : Pushing dbachecks.1.1.167.nupkg to 'https://www.powershellgallery.com/api/v2/package/'...
2019-01-29T17:46:28.0049911Z
2019-01-29T17:46:28.0050057Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.0050425Z
2019-01-29T17:46:28.0050718Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will
2019-01-29T17:46:28.0050850Z now be retried.
2019-01-29T17:46:28.0050989Z
2019-01-29T17:46:28.0051110Z info : An error occurred while sending the request.
2019-01-29T17:46:28.0051205Z
2019-01-29T17:46:28.0051350Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.0051467Z host.
2019-01-29T17:46:28.0051580Z
2019-01-29T17:46:28.0051697Z info : An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.0051795Z
2019-01-29T17:46:28.0051932Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.0052028Z
2019-01-29T17:46:28.0052154Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request will
2019-01-29T17:46:28.0052301Z now be retried.
2019-01-29T17:46:28.0052392Z
2019-01-29T17:46:28.0052528Z info : An error occurred while sending the request.
2019-01-29T17:46:28.0052624Z
2019-01-29T17:46:28.0052771Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.0052928Z host.
2019-01-29T17:46:28.0053021Z
2019-01-29T17:46:28.0053137Z info : An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.0053254Z
2019-01-29T17:46:28.0053369Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.0053668Z
2019-01-29T17:46:28.0054445Z error: An error occurred while sending the request.
2019-01-29T17:46:28.0054631Z
2019-01-29T17:46:28.0054827Z error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.0054988Z host.
2019-01-29T17:46:28.0055113Z
2019-01-29T17:46:28.0055296Z error: An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.1040958Z Publish-PSArtifactUtility : Failed to publish module 'dbachecks': 'info : Pushing dbachecks.1.1.167.nupkg to
2019-01-29T17:46:28.1041142Z 'https://www.powershellgallery.com/api/v2/package/'...
2019-01-29T17:46:28.1041860Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.1042002Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request
2019-01-29T17:46:28.1042063Z will now be retried.
2019-01-29T17:46:28.1042140Z info : An error occurred while sending the request.
2019-01-29T17:46:28.1042206Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.1042453Z host.
2019-01-29T17:46:28.1042504Z info : An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.1042609Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.1042880Z info : An error was encountered when fetching 'PUT https://www.powershellgallery.com/api/v2/package/'. The request
2019-01-29T17:46:28.1043005Z will now be retried.
2019-01-29T17:46:28.1043145Z info : An error occurred while sending the request.
2019-01-29T17:46:28.1043632Z info : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.1044146Z host.
2019-01-29T17:46:28.1044331Z info : An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.1044528Z info : PUT https://www.powershellgallery.com/api/v2/package/
2019-01-29T17:46:28.1045903Z error: An error occurred while sending the request.
2019-01-29T17:46:28.1046011Z error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote
2019-01-29T17:46:28.1046108Z host.
2019-01-29T17:46:28.1046176Z error: An existing connection was forcibly closed by the remote host
2019-01-29T17:46:28.1046415Z '.
2019-01-29T17:46:28.1046493Z At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.3\PSModule.psm1:10883 char:17
2019-01-29T17:46:28.1046575Z + ... Publish-PSArtifactUtility @PublishPSArtifactUtility_Param ...
2019-01-29T17:46:28.1047033Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-01-29T17:46:28.1047143Z + CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
2019-01-29T17:46:28.1047412Z + FullyQualifiedErrorId : FailedToPublishTheModule,Publish-PSArtifactUtility
2019-01-29T17:46:28.1047461Z
2019-01-29T17:46:28.2783289Z ##[error]PowerShell exited with code '1'.

as can be seen here

https://dev.azure.com/sqlcollaborative/dbachecks/_releaseProgress?_a=release-environment-logs&releaseId=92&environmentId=92

To gather the actual error required emailing someone at Microsoft to get info from the logs

System.InvalidOperationException: There were errors extracting PowerShell metadata: Unexpected element encountered: ""

Date 29/01/2019

Added skip for authentication scheme #257
Added WhatIf to Update-DbcPowerBiDataSource Thank you @shaneis #590
$null to the left Thank you @jwmoss #588

was the particular error which pointed me directly to the pesky $ in the release notes in the psd1 which are the titles of the GitHub issues fixed and which I didnt think about included the $ (more fool me)

Please can these exceptions be surfaced to the user to enable troubleshooting.

Incidentally, this also passed Test-ModuleManifest - Does an issue need to be raised there also ?

Allow to signup for notifications of module updates

Right now when you publish a module you get email notification. It would be nice if one could signup for email/push notifications when modules you use change.

This comes in useful when you actually use something that is updated often and you want to know whether it's critical to update or just minor update. Otherwise some critical updates, security updates can go unnoticed for months.

Install-Module sample command line uses non-existent -AllowPrerelease flag

The Install-Module sample command line for a pre-release package is:

PS> Install-Module -Name PackageManagement -AllowPrerelease

-AllowPrerelease is not a switch that the Install-Module that is shipped in current versions of Windows 10 appears to understand.

The example command box has a link to the documentation for Install-Module: this also does not mention -AllowPrerelease.

If a newer version of Install-Module is needed for -AllowPrerelease consider documenting this and explaining/linking to installation instructions. I've searched this entire repository for "AllowPrerelease" and found only one hit in a helper script.

PS> Get-Help Install-Module

NAME
    Install-Module

SYNTAX
    Install-Module [-Name] <string[]> [-MinimumVersion <version>] [-MaximumVersion <version>] [-RequiredVersion <version>] [-Repository
    <string[]>] [-Credential <pscredential>] [-Scope {CurrentUser | AllUsers}] [-Proxy <uri>] [-ProxyCredential <pscredential>]
    [-AllowClobber] [-SkipPublisherCheck] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

    Install-Module [-InputObject] <psobject[]> [-Credential <pscredential>] [-Scope {CurrentUser | AllUsers}] [-Proxy <uri>]
    [-ProxyCredential <pscredential>] [-AllowClobber] [-SkipPublisherCheck] [-Force] [-WhatIf] [-Confirm]  [<CommonParameters>]

...

PS> Get-Command Install-Module

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Install-Module                                     1.0.0.1    PowerShellGet

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.228
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.228
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Install-Module from PowerShellGet version 2.0.0 does have -AllowPrerelease.

API Keys: "Push new packages and package versions" only works if you specify a Glob in "Select Packages"

Consider the following Key:

image

I would like to push a brand new package so I selected:

"Push new packages and package versions"

If I leave both the Glob and Available Packages blank, I get the red text:
Either a glob pattern must be specified or at least one package ID must be selected.

So I just selected a package under Available packages because I wanted to just publish a new package and since I selected "Push new packages and package versions" I figured this would work fine.

Sadly, this throws a:

'Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.).

What I needed to do was put a * in the Glob section instead of selecting packages to get this to work.

Possible fixes

  • Have a default value for the Glob section like *
  • Warn that the user must use Glob if they want to publish new packages
  • Allow the user to select nothing which will allow that key to only publish new packages
  • Allow the user to publish new packages in addition to the ones selected in Available Packages if they specify "Push new packages and package versions"

Thanks for the help figuring this out @bmanikm !

No way to select a logo in GUI

After uploading a module, i couldnt find a way to change the logo in the GUI.

This is possible in the current PowerShell Gallery, and should be in the preview as well

Regards/R.

No caching headers specified in some responses

This leaves caching entirely up to the browser, and in some cases it will serve stale content quite a long time. Eg:

$resp = iwr https://www.powershellgallery.com/packages/PowerShellGet
C:\WINDOWS\system32>$resp.Headers

Key                       Value
---                       -----
Content-Security-Policy   frame-ancestors 'none'
X-Frame-Options           deny
X-XSS-Protection          1; mode=block
X-Content-Type-Options    nosniff
Strict-Transport-Security max-age=31536000
Content-Length            51565
Cache-Control             private
Content-Type              text/html; charset=utf-8
Date                      Mon, 29 Oct 2018 16:48:47 GMT
Server                    Microsoft-IIS/10.0

Cache-Control:private prevents a proxy from storing the page, but we don't set max-age or etags so browser has to guess. When a new version of a package is published, users may be confused that this version-independent URL doesn't update (because their local browser is caching it).

Truncated descriptions can leave a URL which goes nowhere

In the description for https://www.powershellgallery.com/packages/SqlServer/21.1.18080

You see:

This module allows SQL Server developers, administrators and business intelligence professionals to automate database development and server administration, as well as both multidimensional and tabular cube processing.
For automation with SSRS & Power BI Report Server, use the ReportingServicesTools module available at https://www.powershellgallery.com/packages/Repor
[View More]

The last part is a clickable URL but goes to https://www.powershellgallery.com/packages/Repor rather than the full URL. Ideally we would interpret readme.md and use that instead of the description if present, but there are several improvements we could make like leaving out the whole URL if it is truncated, etc.

Some packages are not available for download on the east coast

Around the time the new version of the site was published I could no longer access certain packages. An example is xActiveDirectory. It appears to be a problem with the CDN, as I've tested the following download URL from hosts located in different regions.
https://psg-prod-eastus.azureedge.net/packages/xactivedirectory.2.21.0.nupkg

When trying to access this endpoint from Washington, DC I get the following response:

<BlockList>
<CommittedBlocks/>
</BlockList>

This is true for package versions 0.21.0 and 0.20.0 while 0.19.0 and below are available.

When trying the URL from a hosts in Dallas, TX, Sacramento, CA all versions are available.

Another package with the same behavior is AzureRM.profile

Can't request JSON response with API calls to /api/v2

Hi. We rely on the powershell gallery API on https://shields.io/ to generate badges which are used by many popular powershell gallery projects. Since the recent updates to powershell gallery, we are now unable to request data from the API in JSON format - it seems the content negotiation header is no longer respected. For example, if I call

$ curl -H "Accept: application/atom+json,application/json" "https://www.powershellgallery.com/api/v2/Packages()?$filter=Id%20eq%20'ACMESharp'%20and%20IsLatestVersion%20eq%20true"

this now unexpectedly returns an XML response. This means none of our powershell gallery badges will render because the code that generates them expects JSON and fails to parse the XML response. Examples:

Do we now need to pass a different header, or is this a bug? It would be great if we could get these fixed for our mutual users.

The Gallery should move to GitHub Commenting

Please note that this is not an official proposal/committed work but a chance for community feedback and discussion on where the Gallery should go with commenting

Motivation

Livefyre, the current commenting service on the Gallery, doesn't always produce a great experience and it is difficult for us to quickly resolve bugs when they occur because it is a 3rd party service.
The text format of the comments is not ideal for commenting and debugging code.
Many package comments don't have a good response time because it can be difficult
for package owners to manage multiple flows of feedback.
Since many package owners already host their projects on GitHub and respond to issues
there, there is an opportunity to integrate these flows.
We believe that by integrating the Gallery comment section with Git Hub issues we
can improve the overall experience for both publishers and consumers.

Specification

  • A comment on the package page would open an issue on the GitHub project site
  • The feedback commenting system would be similar to the model used by Microsoft Docs
  • The commenting system would need to be configurable for those who host their
    packages on other repositories
  • Users should be able to read comments without needing an account of any type
  • Users will need/create a GitHub account to comment on packages
  • Livefyre commenting would remain, at least intermediately, for those without project sites

Open Questions

  • Would using GitHub instead of Livefyre be automatic, or opt-in?
  • Would old Livefyre comments be retained on the page?

Package Statistics Showing for Unlisted Version

The Gallery should not display statistics for hidden modules. The statistics should display for the current version on the package page.
i.e. The page should be displaying downloads for 11.0.0.10380590 rather than 11.1.0.1289667 in this case since 11.1.0.1289667 is unlisted
image

Error 500 on Edit Profile in powershellgallery.com

Oops!

Error 500 - Internal Server Error

An error occurred while processing your request. We really messed up this time...

We have logged the error and will look into it so that it doesn't happen again; however, if you keep seeing this page, please file a bug! <--: This is us now

Get me out of here! Go home

Wondering if PowerShell Gallery is down? Check our status

Looking for a package? Try searching

Package you're looking for doesn't exist? Make one

Pretty sure we messed up? File a bug

PoshTest Gallery is not sending the correct 'latest version' package information

PoshTest Gallery is not sending the correct package information for "isLatestVersion" and "IsAbsoluteLatestVersion".

I have a module, PMTestModule that takes a dependency on a module PMTestDepenency1. There are two versions of this dependency, version 1.0 which is listed and version 1.0.1 which is unlisted.

Running Save-Package -name PMTestModule -source PoshTest -path . -requiredversion 1.0.2
Saves PMTestDependency1 version 1.0 instead of the latest version, 1.0.1.

Package Management's Nuget Provider iterates through all the versions of all the modules, but I noticed that when I print out the attributes for each module, PMTestDependency1 v1.0 has "IsLatestVersion" and "IsAbsoluteLatestVersion" attributes set to true, and PMTestDependency1 v.1.0.1 has the two set to false, when it should be the other way around.

Ultimately this is preventing Package Management from saving or installing the latest version of a dependency if that version is unlisted.

PoshTest is registered as:
packagesource

pkgerror

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.