Descoberta, instalação e inventário do módulo PowerShell com o PowerShellGetPowerShell Module Discovery, Install and Inventory with PowerShellGet

O PowerShellGet está incluído nesta versão do WMF:PowerShellGet is included in this release of WMF:

  • Find-Module pode filtrar nos metadados do módulo com o parâmetro -TagFind-Module can filter on module metadata with the -Tag parameter
  • Find-Module pode filtrar na linguagem de pesquisa específica do repositório com o parâmetro -FilterFind-Module can filter on repository-specific search language with the -Filter parameter
  • Find-Module pode filtrar no conteúdo do módulo com os parâmetros -Command, -DscResource e -IncludesFind-Module can filter based on module contents with the -Command, -DscResource, and -Includes parameters
  • Find-DscResource permite a descoberta de recursos DSC individuais nos repositóriosFind-DscResource allows discovery of individual DSC resources in repositories
  • Suporte para instalação desde compartilhamentos de arquivos e publicação neles com o NuGetSupport for installing from and publishing to file shares with NuGet

Comandos de exemploExample commands

\# Find all modules with tags Azure or DSC
Find-Module -Tag Azure, DSC

\# Find modules with a specific DscResource
Find-Module -DscResource xFirewall

\#Find modules with specific commands
Find-Module -Command Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer

\# Find all modules with Dsc resources
Find-Module -Includes DscResource

\# Find all modules with cmdlets
Find-Module -Includes Cmdlet

\# Find all modules with functions
Find-Module -Includes Function

\# Find all DSC resources
Find-DscResource

\# Find all DSC resources contained within a specific module
Find-DscResource -ModuleName xNetworking

\# Find all DSC resources in modules with DSCResourceKit or DesiredStateConfiguration
Find-DscResource -Tag DesiredStateConfiguration, DSCResourceKit

\# Find modules using -Filter parameter
\# Specified filter value is searched in Name and Description properties
Find-Module -Filter Cookbook -Repository PSGallery
Find-Module -Filter RBAC -Repository PSGallery

Novos recursos no PowerShellGetNew features in PowerShellGet

  • Suporte à versão lado a lado no Windows PowerShell 5.0 ou mais recenteSide-by-side version support on Windows PowerShell 5.0 or newer
  • Suporte à instalação de dependências do móduloModule dependency installation support
  • Três novos cmdletsThree new cmdlets
    • Get-InstalledModuleGet-InstalledModule
    • Uninstall-ModuleUninstall-Module
    • Save-ModuleSave-Module