PowerShellGet

When it comes to working with our newly created gallery, the PowerShellGet and PackageManagement modules are necessary. While the PackageManagement module allows general access to different package providers and allows you to, for example, push and pull NuGet packages, PowerShellGet is PowerShell-specific. PackageManagement is the required module for PowerShellGet, so you can see that they are tightly coupled:

# Compare PackageManagement and PowerShellGet
Get-Command -Module PackageManagement
Get-Command -Module PowerShellGet

# List the pre-installed source
Get-PSRepository

# Connect to the source to download data
# For the default repository you don't need to specify the name
Find-Module AutomatedLab -Repository PSGallery

# Interacting with the repositories will prompt you to download
# nuget.exe, as it is the package provider to save and install modules
# Save a module to review the code
Save-Module AutomatedLab -Path .

# Install the module
Install-Module AutomatedLab -Scope CurrentUser

# Register our own repository
Register-PSRepository -Name Internal -SourceLocation https://NUGSV01/api/v2 -PublishLocation https://NUGSV01/api/v2
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset