From the course: Learning PowerShell Core

PowerShell Gallery - PowerShell Tutorial

From the course: Learning PowerShell Core

Start my 1-month free trial

PowerShell Gallery

- [Instructor] The PowerShell Gallery is an online repository full of modules you can download and begin working with today. These modules are built both by Microsoft and by those in the PowerShell community. The PowerShell Gallery is available via browser at powershellgallery.com, where you can graphically browse available modules. However most of the time, you'll be browsing the PowerShell Gallery with PowerShell itself, using commands like find module, install module and update module. With PowerShell's intuitive command naming convention, you probably already know what each of those commands do without me even explaining. If not, you'll get an eye opener in this upcoming demo. So I'm here at powershellgallery.com. This is where you can view and download PowerShell scripts, modules and other packages. We can click on the packages link here and you can see all kinds of different ways to look for all of the different modules. However, this is the PowerShell Core course. We're not going to mess with the browser. Let's actually manage these modules inside of PowerShell itself. So I'll go back over here to my PowerShell Console Core and first up, let's see if we can query all those modules inside the PowerShell Gallery. To do that, we can use the find module command. If I just run find module without any kind of parameters, it will enumerate all of the modules on the PowerShell Gallery. However, let's say that we want to find a module that's specifically related around SQL. To do that, I can run find module again, provided the parameter of name, and let's say that I want to find all of the modules that start with SQL. And once I do that, it will bring down all of the modules that start with SQL. However, don't get too excited just yet. Unfortunately, a lot of the modules inside of the PowerShell Gallery are only built for Windows PowerShell. However, what we can do is we can limit that down by modules that the author says should be supported by PowerShell Core. To find the modules that are built for PowerShell Core, we can use the tag parameter on find module and specify PSEdition_Core. Now this brings back all of the modules that should be compatible with PowerShell Core. Now I say that it should be, because tagging the PowerShell module as PowerShell Core compatible is completely up to the author. There may be a chance that the module will work with PowerShell Core, however the author hasn't updated it yet, so what I recommend is downloading it, giving it a try with PowerShell Core, going through the testing and actually seeing if it works.

Contents