Ok so If you didn’t already know then this happened
I got bored so have Created an Auto-Bot for Tweeting about Releases in the PowerShell Gallery
— Ryan (@ryanyates1990) December 31, 2015
cc @jsnover https://t.co/QgfMhTaGDu
And although it has been interesting it has also brought up some issues (mainly data which is one of my biggest bug bears in all things IT) with the PowerShell Gallery and these include and is not limited to
Publish-Module is partially Broken – This is due to it requiring you to add in LicenseURI & ProjectUri when run – however the issue then lies that this information doesn’t make it to the Gallery Pages nor does it make it to the Gallery Items when using Find-Module. This means that there is a seemingly large number of Modules that don’t seem to include this *mandatory* information.
There is a workaround and this should be what you are doing anyway but that is to ensure that in the PSD1 file for the module that this information is included in there as then it gets populated to the Gallery correctly. It is thanks to an Impromptu chat with Doug Finke (@Dfinke) that this came out of the woodwork and was confirmed as being the resolution– So thanks Doug!
Also I decided to confirm this via uploading 2 different modules ThePSGallery-Working & ThePSGallery-Broken - conclusive results show that the only method to get the LicenseURI & ProjectURI to show in the Gallery (either via the Website or via Find-Module) is to include it in the psd1 file.
So Go and update your psd1 files to include this and please upvote this issue on UserVoice to either force this be updated or to drop the LicenseURI & ProjectURI from Publish-Module - http://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11439807-gallery-issue-licenseuri-projecturi-aren-t-add
- Author Details – Again this is massively broken due to the nature of the Gallery with simple things like spelling mistakes etc in Author names which then means there are 3 or 4 authors that are actually 1 person See the Author Details file in the Github Repo for the PSGallery ( https://github.com/kilasuit/ThePSGallery/ )for more details which was built using the below logic
Find-module \* | Select-object Author | Sort-Object -Unique | Out-File Authors.txt
I would Suggest that the Gallery also allows the Profile to link to other Social networks like Twitter and get the Twitter Handle (Would be great to be able to get ThePSGallery Autobot to include the author in the tweets thus increasing visibility to those that submit work there)
I would also suggest that any Authors include an additional Hashtable for the PrivateData section that includes any additional Contact info – Like Twitter or Blog Urls etc and sets this as a default psd1 variable – Will be posting about this shortly.
Additional Metadata – I for one would like to be able to with the AutoBot to be able to tweet on 100, 1000, 10000 downloads of a module to congratulate the authors. However this isn’t made available at the present time via Find-Module however can be gotten via WebScraping Methods – Not particularly resource friendly and time consuming too. I have raised this to the Powers that be via UserVoice and you can upvote this as well via http://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11279160-add-additonal-properties-to-powershell-gallery-ite
Lastly – Find-Module isn’t very User friendly for cmdlet, function, workflow or DSCResource searching if tags aren’t used. This is a bit simpler to get around but the logic is rather hidden in how to do so as you would have to call
Find-Module *
and then Pipe this toSelect-Object -ExpandProperty Includes
and then toWhere-Object
So for SharePoint it May look like this which isn’t very graceful at all but this does return the 2 Modules that have SharePoint in Function Names – Problem being what if they aren’t functions but Cmdlets.
Find-Module \* | Select-Object Name -ExpandProperty Includes | Where-Object {$\_.Function -like '\*SharePoint\*'} | Select-Object Name
Again there is a UserVoice Suggestion for this at http://windowsserver.uservoice.com/forums/301869-powershell/suggestions/11088855-find-module-needs-improvements-to-enable-better-di
Hopefully that’s a small insight to ThePSGallery AutoBot and in a future Blog Post I will detail the inner workings of the AutoBot including the actual script that runs it (not on Github as of yet)