

Then comes the problem of how to deploy and keep software up to date. Even organizations that had virtual private network (VPN) solutions already in place scrambled to scale them to handle a significantly higher load. But organizations were caught off guard and needed to quickly find ways to let employees work remotely and securely.

Write-Verbose -Message "choco install -y $($package.2020 saw more people work from home than ever due to the worldwide health pandemic. $Packages = Get-ChildItem -Path $PackageSource Write-Verbose -Message "Current package: $PackageName" The OutputPath is the location where we want to output our NuGet packages to.Ĭompiled nupkg contents include chocolateyInstallĪfter we have generated our internal NuGet Packages, we can use the following PowerShell function to install them. The SourcePath parameter is the root path of our package(s). This PowerShell function takes two parameters: SourcePath and OutputPath. Write-Verbose -Message 'Successfully built Chocolatey packages' Write-Warning -Message "Failed to build Chocolatey package for $pkg" Write-Verbose -Message "Trying to build NuGet package for $pkg"Ĭhoco pack -outputdirectory "$OutputPath" -use-system-powershell

$pkgs = Get-ChildItem -Directory $srcPath Write-Verbose -Message "Creating $OutputPath" Write-Verbose -Message 'Building local Chocolatey packages' [CmdletBinding(DefaultParameterSetName = 'Parameter Set 1', Now that we understand the basics of our nuspec packages, we now need to call our New-LocalChocoPackage.ps1 script that will loop through a directory of packages and generate new NuGet package (nupkg) files. Under each package name, we have a nuspec XML file and a subfolder called tools that contains our chocolateyInstall.ps1 file. We have a top-level Packages folder followed by our package name. As a reminder, here is our internal folder structure of the packages we need to generate.
