Discovering packages from the PowerShell Gallery
Find packages in the PowerShell Gallery by using the Search control on the PowerShell Gallery's home page.By browsing through the Modules and Scripts from the Packages page.
Running the Find-Module, Find-DscResource, and Find-Script cmdlets, depending on the package type, with -Repository PSGallery.
Installing packages from the PowerShell Gallery
To download a package from the Gallery for inspection, run either the Save-Module or Save-Script cmdlet.Install a package from the Gallery for use, run either the Install-Module or Install-Script cmdlet.
Updating packages from the PowerShell Gallery
To update packages installed from the PowerShell Gallery, run either the Update-Module or Update-Script cmdlet.When run without any additional parameters, [Update-Module][] attempts to update all modules installed by running Install-Module.
To selectively update modules, add the -Name parameter.
List packages that you have installed from the PowerShell Gallery
To find out which scripts you have installed from the PowerShell Gallery, run the Get-InstalledScript cmdlet.
Some examples:
Search through all scripts in the GridView window and install the selected script in the currentuser environment variable ($env:USERPROFILE\Documents\WindowsPowerShell\Modules):
Find-Script | Out-Gridview -Title "Select Script to install" -PassThru | Install-Script -Force -Scope CurrentUser
Search through all modules in the GridView window and install the selected module in the currentuser environment variable:Find-Module | Out-Gridview -Title "Select Modules to install" -PassThru | Install-Module -Force -Scope CurrentUser
Update all installed modules without interaction:
Update-Module -Force
Update all installed script without interaction:Update-Script -Force
No comments:
Post a Comment