Guides/PackageManagement.ps1
# How to Add Public and Private Nuget PowerShell Repository # GET WMF 5.0/5.1 Install-PackageProvider Nuget install-module packagemanagement install-module powershellget -force Register-PSRepository -Name TECNuget -SourceLocation "https://nuget.tec.clinitech.net/Nuget/nuget" -PublishLocation "https://nuget.tec.clinitech.net/Nuget/nuget" -InstallationPolicy Trusted # Fetch All Packages Install-Module POSH-SSH -Repository PSGallery Install-Module SwisPowerShell -Repository PSGallery # Pull all From Repository Find-Module -Repository TECNuget | Install-Module # Push one change to Repository Get-Module -Name TEC.Common -ListAvailable | Publish-Module -Repository TECNuget -NuGetApiKey $Global:NugetKey -Exclude "**\*.ESS" # Push all changes to Repository $LocalModules = (Get-ChildItem $global:PS_ModulePath | where name -like "TEC.*").Name foreach ($LocalModule in $LocalModules) { Write-Host "Publishing $LocalModule..." -ForegroundColor Yellow Publish-Module -Name $LocalModule -Repository TECNuget -NuGetApiKey $Global:NugetKey -Exclude "**\*.ESS" } |