<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-AU" xmlns:media="http://search.yahoo.com/mrss/">
  <id>https://david.gardiner.net.au/tags/Chocolatey.xml</id>
  <title type="html">David Gardiner - Chocolatey</title>
  <updated>2026-06-08T00:40:31.339Z</updated>
  <subtitle>Blog posts tagged with &apos;Chocolatey&apos; - A blog of software development, .NET and other interesting things</subtitle>
  <rights>Copyright 2026 David Gardiner</rights>
  <icon>https://www.gravatar.com/avatar/37edf2567185071646d62ba28b868fab?s=64</icon>
  <logo>https://www.gravatar.com/avatar/37edf2567185071646d62ba28b868fab?s=256</logo>
  <generator uri="https://github.com/flcdrg/astrojs-atom" version="3">astrojs-atom</generator>
  <author>
    <name>David Gardiner</name>
  </author>
  <link href="https://david.gardiner.net.au/tags/Chocolatey.xml" rel="self" type="application/atom+xml"/>
  <link href="https://david.gardiner.net.au/tags/Chocolatey" rel="alternate" type="text/html" hreflang="en-AU"/>
  <category term="Chocolatey"/>
  <category term="Software Development"/>
  <entry>
    <id>https://david.gardiner.net.au/2024/03/au-dotnet</id>
    <updated>2024-03-31T17:00:00.000+10:30</updated>
    <title>Automatic updating of Chocolatey packages with .NET</title>
    <link href="https://david.gardiner.net.au/2024/03/au-dotnet" rel="alternate" type="text/html" title="Automatic updating of Chocolatey packages with .NET"/>
    <category term=".NET"/>
    <category term="Chocolatey"/>
    <category term="GitHub Actions"/>
    <category term="PowerShell"/>
    <published>2024-03-31T17:00:00.000+10:30</published>
    <summary type="html">How to automate Chocolatey package updates with .NET tooling as a replacement for the AU PowerShell module.</summary>
    <content type="html">&lt;p&gt;I maintain quite a few &lt;a href=&quot;https://community.chocolatey.org/profiles/flcdrg&quot;&gt;Chocolatey packages&lt;/a&gt;. The source for these packages lives in &lt;a href=&quot;https://github.com/flcdrg/au-packages/&quot;&gt;https://github.com/flcdrg/au-packages/&lt;/a&gt;, and until recently I used the &lt;a href=&quot;https://www.powershellgallery.com/packages/AU/2022.10.24&quot;&gt;AU PowerShell module&lt;/a&gt; to detect and publish updated versions of the packages.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/chocolatey-logo.q-2VblLS_1Bkbou.webp&quot; alt=&quot;Chocolatey logo&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The first issue was that unfortunately, the original maintainer of the AU module archived the project on GitHub. The Chocolatey Community stepped in and is now maintaining a fork &lt;a href=&quot;https://github.com/chocolatey-community/chocolatey-au&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The second issue I hit that was causing issues was a compatibility issue with newer versions of PowerShell 7. AU was originally written for Windows PowerShell 5, but I have made extensive use of features of PowerShell 6 and 7 in my update scripts. That didn&apos;t seem to cause issues until the GitHub Actions agents were &lt;a href=&quot;https://github.com/actions/runner-images/issues/9115&quot;&gt;updated from PowerShell 7.2 to 7.4 in January&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The specific problem would reveal itself like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Chocolatey had an error occur: System.ArgumentException: File specified is either not found or not a .nupkg file. &apos;D:\a\au-packages\au-packages\microsoft-teams.install\microsoft-teams.install.1.7.0.3653.nupkg &apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For some reason, the AU module was able to generate a new version of a package, but when it called the Chocolatey CLI (&lt;code&gt;choco.exe&lt;/code&gt;) and passed the path to the nupkg file, it appeared that there was a trailing space in the filename!&lt;/p&gt;
&lt;p&gt;I spent hours trying to debug this to no avail. This was not made any easier by the fact that AU uses &lt;a href=&quot;https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_jobs?view=powershell-7.4&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;PowerShell Jobs&lt;/a&gt; to spin up separate processes for each package so they can be processed in parallel. I could not get debugging to work inside a Job when using the Visual Studio Code PowerShell debugger. Even the old-style debugging approach of &lt;code&gt;Write-Host &quot;I got here&quot;&lt;/code&gt; didn&apos;t work very well as all output of the job is captured isn&apos;t easy to extract (let alone being able to inspect the original variables as proper objects rather than serialised strings)&lt;/p&gt;
&lt;p&gt;Eventually, I decided I was wasting my time trying to solve this, and maybe if I rewrote the updating logic myself I could mitigate the issue.&lt;/p&gt;
&lt;p&gt;There are essentially two parts to the AU module - the bits that support updating an individual package, and then there are the bits that run over all your packages. It&apos;s that second part that makes use of PowerShell Jobs and I suspected was the source of the problem.&lt;/p&gt;
&lt;p&gt;I figured rewriting that part in C#/.NET would mean I had a much nicer debugging experience (should I need it). I wanted to leave the individual package updating alone - it would be a significant effort to migrate all the custom &lt;code&gt;update.ps1&lt;/code&gt; scripts to something else.&lt;/p&gt;
&lt;h2&gt;au-dotnet&lt;/h2&gt;
&lt;p&gt;And so &lt;a href=&quot;https://github.com/flcdrg/au-dotnet&quot;&gt;au-dotnet&lt;/a&gt; was born.&lt;/p&gt;
&lt;p&gt;It is a reasonably simple .NET 8 console application that iterates over all the packages in my au-packages repository, and then calls the PowerShell &lt;code&gt;update.ps1&lt;/code&gt; script in each to see if there is a new version to generate and publish.&lt;/p&gt;
&lt;p&gt;Rather than just call out to the operating system to run each &lt;code&gt;update.ps1&lt;/code&gt; script, I decided to embed PowerShell in the application. This gives me a bit more control over how the scripts are run and the ability to capture any script output (and errors) from each run.&lt;/p&gt;
&lt;h3&gt;Hosting PowerShell&lt;/h3&gt;
&lt;p&gt;Figuring out how to host PowerShell in a .NET 8 application took a little bit of research. Many of the articles you find (and even some of the official documentation) are still aimed at Windows PowerShell.&lt;/p&gt;
&lt;p&gt;The key was to reference these three NuGet packages (and use the same version of each package):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microsoft.PowerShell.Commands.Diagnostics&lt;/li&gt;
&lt;li&gt;Microsoft.PowerShell.SDK&lt;/li&gt;
&lt;li&gt;System.Management.Automation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can then create a &lt;a href=&quot;https://learn.microsoft.com/dotnet/api/system.management.automation.powershell?view=powershellsdk-7.4.0&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;PowerShell Class&lt;/a&gt; instance like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var iss = InitialSessionState.CreateDefault2();
iss.ExecutionPolicy = Microsoft.PowerShell.ExecutionPolicy.RemoteSigned;

var ps = PowerShell.Create(iss);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can capture any output via the &lt;a href=&quot;https://learn.microsoft.com/dotnet/api/system.management.automation.powershell.streams?view=powershellsdk-7.4.0&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;&lt;code&gt;Streams&lt;/code&gt;&lt;/a&gt; property. eg. Here I am logging any errors from PowerShell as a GitHub Action error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ps.Streams.Error.DataAdded += (_, args) =&amp;gt;
{
    core.WriteError(ps.Streams.Error[args.Index].ToString());
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running specific PowerShell cmdlets can be done via the &lt;a href=&quot;https://learn.microsoft.com/dotnet/api/system.management.automation.powershell.addcommand?view=powershellsdk-7.4.0&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;&lt;code&gt;AddCommand&lt;/code&gt;&lt;/a&gt; method. eg.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ps.AddCommand(&quot;Set-Location&quot;).AddParameter(&quot;Path&quot;, directory).Invoke();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Whereas running arbitrary PowerShell scripts is done via the &lt;a href=&quot;https://learn.microsoft.com/dotnet/api/system.management.automation.powershell.addscript?view=powershellsdk-7.4.0&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;&lt;code&gt;AddScript&lt;/code&gt;&lt;/a&gt; method. eg.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ps.AddScript(&quot;$ErrorView = &apos;DetailedView&apos;&quot;).Invoke();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the script is in a separate &lt;code&gt;.ps1&lt;/code&gt; file, the only way I&apos;ve found so far is to load that file into a string and pass it in. It would be nicer if you could point it at the file (so debugging/errors could include line numbers) but I have yet to find a way to do that.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var output = ps.AddScript(File.ReadAllText(Path.Combine(directory, &quot;update.ps1&quot;)))
.Invoke();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One thing to remember is you must call the &lt;a href=&quot;https://learn.microsoft.com/dotnet/api/system.management.automation.powershell.invoke?view=powershellsdk-7.4.0&amp;amp;WT.mc_id=DOP-MVP-5001655&quot;&gt;&lt;code&gt;Invoke&lt;/code&gt;&lt;/a&gt; method to actually run the scripts or commands you&apos;ve just added.&lt;/p&gt;
&lt;h3&gt;GitHub Action logging and summary&lt;/h3&gt;
&lt;p&gt;Because I know the application will be run in a GitHub Actions workflow, I made use of the excellent &lt;a href=&quot;https://www.nuget.org/packages/GitHub.Actions.Core&quot;&gt;GitHub.Actions.Core&lt;/a&gt; NuGet package for formatting output, as well as generating a nice build summary that lists all packages that were updated in the current run.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/build-summary.BBYF1cs__Z18vxyw.webp&quot; alt=&quot;Screenshot of GitHub Actions build summary, showing 17 packages updated and a table with the package names and versions&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Commit and publish&lt;/h3&gt;
&lt;p&gt;If a new package is created (eg. a &lt;code&gt;.nupkg&lt;/code&gt; file now exists) then we assume this file can be submitted to the Chocolatey Community Repository. &lt;code&gt;choco push&lt;/code&gt; is then called to upload the package. Remember this was where we hit that error with the trailing space? Pleasingly the .NET version doesn&apos;t exhibit this behaviour, so that problem is solved.&lt;/p&gt;
&lt;p&gt;Assuming the package is submitted successfully then we call `git`` to stage any modified files from this package and add a tag indicating the package that was updated.&lt;/p&gt;
&lt;p&gt;After all packages have been processed, we will commit all staged files and push the commit back to the repo, so that we get a version history of all the package changes.&lt;/p&gt;
&lt;h3&gt;Enhancements&lt;/h3&gt;
&lt;p&gt;I am currently using my fork of the chocolatey-au module, which has one minor enhancement. It adds a &lt;code&gt;Files&lt;/code&gt; collection property to the &lt;code&gt;AUPackage&lt;/code&gt; PowerShell class. This collection is populated with the paths of all the files that were downloaded (and had their checksums calculated).&lt;/p&gt;
&lt;p&gt;I make use of this for some of my packages to pre-emptively upload the files to VirusTotal. This can help fast-track the packages being approved by Chocolatey as it means the Chocolatey virus scanning step is already completed. Because I use the &lt;a href=&quot;https://community.chocolatey.org/packages/vt-cli&quot;&gt;VirusTotal CLI&lt;/a&gt; tool for this, it also means I can upload files &lt;a href=&quot;https://github.com/VirusTotal/vt-cli/issues/33#issuecomment-850213255&quot;&gt;up to 650MB&lt;/a&gt; (compared to Chocolatey&apos;s current 200MB limit due to using an older API).&lt;/p&gt;
&lt;p&gt;I have &lt;a href=&quot;https://github.com/chocolatey-community/chocolatey-au/pull/53&quot;&gt;submitted the Files property enhancement&lt;/a&gt; to chocolatey-au.&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;You can see this in action in the latest workflow runs at &lt;a href=&quot;https://github.com/flcdrg/au-packages/actions&quot;&gt;https://github.com/flcdrg/au-packages/actions&lt;/a&gt;.&lt;/p&gt;
</content>
    <media:thumbnail url="https://david.gardiner.net.au/_astro/chocolatey-logo.q-2VblLS.png" width="403" height="275"/>
    <media:content medium="image" url="https://david.gardiner.net.au/_astro/chocolatey-logo.q-2VblLS.png" width="403" height="275"/>
  </entry>
  <entry>
    <id>https://david.gardiner.net.au/2023/10/vagrant-virtualbox-hyperv</id>
    <updated>2023-10-28T13:30:00.000+10:30</updated>
    <title>Converting a Vagrant VirtualBox .box file to Hyper-V</title>
    <link href="https://david.gardiner.net.au/2023/10/vagrant-virtualbox-hyperv" rel="alternate" type="text/html" title="Converting a Vagrant VirtualBox .box file to Hyper-V"/>
    <category term="Chocolatey"/>
    <category term="Virtual Machines"/>
    <category term="Hyper-V"/>
    <published>2023-10-28T13:30:00.000+10:30</published>
    <summary type="html">How to convert a Vagrant VirtualBox .box file to work with the Windows Hyper-V hypervisor</summary>
    <content type="html">&lt;p&gt;I maintain quite a number of &lt;a href=&quot;https://community.chocolatey.org/profiles/flcdrg&quot;&gt;Chocolatey packages&lt;/a&gt;, and sometimes I need to test a new package out, or resolve an issue that has been reported with an updated version of a package. If it is for software that I use regularly, I&apos;ll likely do the testing directly on my own machine. But if otherwise a virtual machine makes much more sense, as I can dispose of it once I&apos;m done.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-logo.BOYyrMGo_Z2uaEAk.webp&quot; alt=&quot;Vagrant logo&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Chocolatey even provides a semi-automated way to do this using the HashiCorp tool &lt;a href=&quot;https://developer.hashicorp.com/vagrant&quot;&gt;Vagrant&lt;/a&gt;. They have a pre-built Windows image that is identical to the one they use for their own package verification process. Have a look at the &lt;a href=&quot;https://github.com/chocolatey-community/chocolatey-test-environment&quot;&gt;https://github.com/chocolatey-community/chocolatey-test-environment&lt;/a&gt; repo to find out more.&lt;/p&gt;
&lt;p&gt;One issue I&apos;ve encountered relates to the recent upgrading of the image to version 3.0.0, which is now is based on Windows Server 2019. The previous image version (2.0.0) was built using 2012R2. Unfortunately, for some reason while the older image was provided in both VirtualBox and Hyper-V formats, the 3.0.0 image currently only has VirtualBox support. Given the choice, I&apos;d prefer to stick with Hyper-V (rather than having to install another hypervisor on my machine). The problem is if I follow the instructions and use the default Vagrantfile from the &lt;a href=&quot;https://github.com/chocolatey-community/chocolatey-test-environment&quot;&gt;Chocolatey test environment repository&lt;/a&gt;, if I only have Hyper-V installed, it will download the older 2.0.0 image. How can I use the newer one? What follows are the steps I used to create a Hyper-V compatible box file from the VirtualBox one.&lt;/p&gt;
&lt;p&gt;First off, download the 3.0.0 image that targets VirtualBox. I don&apos;t have VirtualBox installed, but you can still tell Vagrant to download that format by providing the &lt;code&gt;--provider&lt;/code&gt; parameter. e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant box add chocolatey/test-environment --provider VirtualBox
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&apos;ll see the following output (it may take a few minutes as like most Windows VM images, it is quite large)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;==&amp;gt; box: Loading metadata for box &apos;chocolatey/test-environment&apos;
    box: URL: https://vagrantcloud.com/chocolatey/test-environment
==&amp;gt; box: Adding box &apos;chocolatey/test-environment&apos; (v3.0.0) for provider: VirtualBox
    box: Downloading: https://vagrantcloud.com/chocolatey/boxes/test-environment/versions/3.0.0/providers/VirtualBox/unknown/vagrant.box
    box:
    box: Calculating and comparing box checksum...
==&amp;gt; box: Successfully added box &apos;chocolatey/test-environment&apos; (v3.0.0) for &apos;VirtualBox&apos;!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The files for this image are saved under the &lt;code&gt;vagrant.d&lt;/code&gt; directory in your user profile. eg. for me they&apos;re in&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C:\Users\david\.vagrant.d\boxes\chocolatey-VAGRANTSLASH-test-environment\3.0.0\VirtualBox
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this directory, you can see the following files:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a---        15/10/2023  12:38 PM           9047   box.ovf
-a---        15/10/2023  12:38 PM     7993072640 󰋊  chocolatey-test-environment-disk001.vmdk
-a---        15/10/2023  12:38 PM             26   metadata.json
-a---        15/10/2023  12:38 PM           3700   Vagrantfile
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ah haa. A .VMDK file! Now we need to convert this to a VHD. There&apos;s a few different ways to do this. The most reliable I&apos;ve found is the &lt;a href=&quot;https://www.starwindsoftware.com/starwind-v2v-converter&quot;&gt;StarWind V2V Converter tool&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-01.ChZHQNMV_ZHRM1s.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select source image location, local file&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-02.BHrvliYs_Z1yVKwa.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select source image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-03.C4VEa_XD_Z293e4E.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select destination image, local file &quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-04.Ctf6CHC6_ZoARJ8.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select destination image format, VHD/VHDX&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-05.t7Q4cGIB_Z2oRobx.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select VHD/VHDX image format, VHD growable&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-06.BjW5q8YZ_ZmcOcd.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Select destination image file name&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vagrant-07.b54n824U_Z2p70yW.webp&quot; alt=&quot;StarWind V2V Conversion Wizard - Conversion progress 100% complete&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Now we can create a temporary virtual machine. Note that we stick with a Generation 1 VM (I tried Generation 2 and it didn&apos;t work). Also, to keep file sizes down, I stuck with a .vhd file (not a .vhdx). A .vhdx file will work but they&lt;/p&gt;
&lt;p&gt;In an elevated prompt, run the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;New-VM -name &quot;test-environment2019&quot; -VHDPath C:\tmp\chocolatey-test-environment-disk001.vhd -Generation 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and you should see this output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Name                 State CPUUsage(%) MemoryAssigned(M) Uptime   Status             Version
----                 ----- ----------- ----------------- ------   ------             -------
test-environment2019 Off   0           0                 00:00:00 Operating normally 11.0
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Set-VMProcessor -VMName test-environment2019 -Count 4
Set-VM -VMName test-environment2019 -AutomaticCheckpointsEnabled $false -CheckpointType Disabled -AutomaticStopAction ShutDown
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start the VM and wait for it to boot. Then sign in (the password is &apos;vagrant&apos;)&lt;/p&gt;
&lt;p&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt;, &lt;strong&gt;Apps&lt;/strong&gt; and click on &lt;strong&gt;Oracle VM VirtualBox Guest Additions&lt;/strong&gt;.
Click &lt;strong&gt;Uninstall&lt;/strong&gt;. Then click &lt;strong&gt;Yes&lt;/strong&gt; to confirm.
The VM will reboot.&lt;/p&gt;
&lt;p&gt;Once it has rebooted, you can shut down the VM.&lt;/p&gt;
&lt;p&gt;Run compress just for good measure&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Optimize-VHD -Path C:\tmp\chocolatey-test-environment-disk001.vhd -Mode Full
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We&apos;re now following the steps outlined in the Vagrant documentation for &lt;a href=&quot;https://developer.hashicorp.com/vagrant/docs/providers/hyperv/boxes#packaging-the-box&quot;&gt;creating a Hyper-V base box&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Export the VM&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Export-VM -VMName test-environment2019 -path c:\tmp\v3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Go to &lt;code&gt;c:\tmp\v3&lt;/code&gt; and delete the &lt;code&gt;Snapshots&lt;/code&gt; folder (it&apos;s probably empty anyway)&lt;/p&gt;
&lt;p&gt;Create a &lt;code&gt;metadata.json&lt;/code&gt; file&lt;/p&gt;
&lt;p&gt;I took a look at the same file in the 2.0.0 box, and it turns out this is all it contains:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;provider&quot;: &quot;hyperv&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add that to the &lt;code&gt;metadata.json&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;Now we need to create a &lt;code&gt;.tar&lt;/code&gt; file (this may take a few minutes). Tar has been &lt;a href=&quot;https://techcommunity.microsoft.com/blog/containers/tar-and-curl-come-to-windows/382409&quot;&gt;included with Windows since late 2017&lt;/a&gt;, but you could also use &lt;a href=&quot;https://7-zip.org/&quot;&gt;7-Zip&lt;/a&gt; or similar.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd C:\tmp\v3\test-environment2019\

tar cvzf c:\tmp\test-environment2019.tar ./*
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we can add this to Vagrant using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant box add C:\tmp\test-environment2019.tar --provider hyperv --name chocolatey/test-environment
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&apos;ll see output similar to the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;==&amp;gt; box: Box file was not detected as metadata. Adding it directly...
==&amp;gt; box: Adding box &apos;chocolatey/test-environment&apos; (v0) for provider: hyperv
    box: Unpacking necessary files from: file:///C:/tmp/test-environment2019.tar
    box:
==&amp;gt; box: Successfully added box &apos;chocolatey/test-environment&apos; (v0) for &apos;hyperv&apos;!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The one issue with this is that you can see the version number of this box is v0. I&apos;d much prefer to set the version 3.0.0. It turns out you can&apos;t set that directly via the command line, but there is a workaround.&lt;/p&gt;
&lt;p&gt;Create another &lt;code&gt;metadata.json&lt;/code&gt; file (in &lt;code&gt;c:\tmp&lt;/code&gt;) and add the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;name&quot;: &quot;chocolatey/test-environment&quot;,
  &quot;versions&quot;: [
    {
      &quot;version&quot;: &quot;3.0.0&quot;,
      &quot;status&quot;: &quot;active&quot;,
      &quot;providers&quot;: [
        {
          &quot;name&quot;: &quot;hyperv&quot;,
          &quot;url&quot;: &quot;file:///C:/tmp/test-environment2019.tar&quot;
        }
      ]
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and add the new box to Vagrant using this file instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant box add .\metadata.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now we see this output&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;==&amp;gt; box: Loading metadata for box &apos;.\metadata.json&apos;
    box: URL: file://C:/tmp/metadata.json
==&amp;gt; box: Adding box &apos;chocolatey/test-environment&apos; (v3.0.0) for provider: hyperv
    box: Unpacking necessary files from: file:///C:/tmp/test-environment2019.tar
    box:
==&amp;gt; box: Successfully added box &apos;chocolatey/test-environment&apos; (v3.0.0) for &apos;hyperv&apos;!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can now list all the boxes Vagrant knows about:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant box list
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;chocolatey/test-environment (hyperv, 0)
chocolatey/test-environment (hyperv, 2.0.0)
chocolatey/test-environment (hyperv, 3.0.0)
chocolatey/test-environment (VirtualBox, 3.0.0)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I just want the &apos;hyperv 3.0.0&apos; box, so I&apos;ll remove the others&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant box remove chocolatey/test-environment --box-version 0 --provider hyperv
vagrant box remove chocolatey/test-environment --box-version 2.0.0 --provider hyperv
vagrant box remove chocolatey/test-environment --box-version 3.0.0 --provider VirtualBox
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And now you should be fine to run &lt;code&gt;vagrant up&lt;/code&gt; to provision a new VM using the Hyper-V provider, and it will use Windows Server 2019!&lt;/p&gt;
&lt;p&gt;Here&apos;s an example of doing this with the &lt;a href=&quot;https://github.com/chocolatey-community/chocolatey-test-environment&quot;&gt;chocolatey-test-environment&lt;/a&gt; (run from an elevated prompt):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vagrant up
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which gives the following output (including signing in with your local username and password):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Bringing machine &apos;default&apos; up with &apos;hyperv&apos; provider...
==&amp;gt; default: Verifying Hyper-V is enabled...
==&amp;gt; default: Verifying Hyper-V is accessible...
    default: Configuring the VM...
    default: Setting VM Integration Services
==&amp;gt; default: guest_service_interface is enabled
==&amp;gt; default: heartbeat is enabled
==&amp;gt; default: key_value_pair_exchange is enabled
==&amp;gt; default: shutdown is enabled
==&amp;gt; default: time_synchronization is enabled
==&amp;gt; default: vss is enabled
    default: Setting VM Enhanced session transport type to disabled/default (VMBus)

Vagrant requires administrator access for pruning SMB shares and
may request access to complete removal of stale shares.
==&amp;gt; default: Starting the machine...
==&amp;gt; default: Waiting for the machine to report its IP address...
    default: Timeout: 130 seconds
    default: IP: 172.20.15.213
==&amp;gt; default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 172.20.15.213:5985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
==&amp;gt; default: Machine booted and ready!
==&amp;gt; default: Preparing SMB shared folders...
    default: You will be asked for the username and password to use for the SMB
    default: folders shortly. Please use the proper username/password of your
    default: account.
    default:
    default: Username (user[@domain]): david
    default: Password (will be hidden):

Vagrant requires administrator access to create SMB shares and
may request access to complete setup of configured shares.
==&amp;gt; default: Mounting SMB shared folders...
    default: C:/dev/git/chocolatey-test-environment/packages =&amp;gt; /packages
    default: C:/dev/git/chocolatey-test-environment =&amp;gt; /vagrant
==&amp;gt; default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==&amp;gt; default: flag to force provisioning. Provisioners marked to run always will still run.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Windows Hyper-V Manager will show the new VM running:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/hyperv-manager.nWdNnbhD_Z1wYjDd.webp&quot; alt=&quot;Windows Hyper-V Manager showing chocolatey-test-environment VM running&quot; /&gt;&lt;/p&gt;
&lt;p&gt;You can also connect to the VM and sign in to confirm it is running Windows Server 2019 and working as expected:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://david.gardiner.net.au/_astro/vm-connected.B1y59jVe_V8VGX.webp&quot; alt=&quot;Screenshot of connection to virtual machine, showing &apos;About Windows&apos; dialog with Windows Server 2019&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;Vagrant error&lt;/h2&gt;
&lt;p&gt;When you run &lt;code&gt;vagrant up&lt;/code&gt;, it fails with the following error (observed with Vagrant 2.3.7):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;An error occurred executing a remote WinRM command.

Shell: Cmd
Command: hostname
Message: Digest initialization failed: initialization error
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Apparently this problem is &lt;a href=&quot;https://github.com/hashicorp/vagrant/issues/13242&quot;&gt;solved with Vagrant version 2.3.8&lt;/a&gt;. Ensure you&apos;re you&apos;re using Vagrant 2.3.8 or newer.&lt;/p&gt;
</content>
    <media:thumbnail url="https://david.gardiner.net.au/_astro/vagrant-logo.BOYyrMGo.png" width="256" height="256"/>
    <media:content medium="image" url="https://david.gardiner.net.au/_astro/vagrant-logo.BOYyrMGo.png" width="256" height="256"/>
  </entry>
  <entry>
    <id>https://david.gardiner.net.au/2019/02/choco-list-localonly-feb-2019-edition</id>
    <updated>2019-02-03T21:15:00.000+10:30</updated>
    <title>Choco list -localonly (Feb 2019 Edition)</title>
    <link href="https://david.gardiner.net.au/2019/02/choco-list-localonly-feb-2019-edition" rel="alternate" type="text/html" title="Choco list -localonly (Feb 2019 Edition)"/>
    <category term="Chocolatey"/>
    <category term="Windows"/>
    <category term="Software"/>
    <published>2019-02-03T21:15:00.000+10:30</published>
    <summary type="html">What software / applications am I using on my laptop (February 2019 Edition) according to Chocolatey?</summary>
    <content type="html">&lt;p&gt;What software / applications am I using on my laptop (February 2019 Edition) according to Chocolatey? Here&apos;s an edited list of the output from  &lt;code&gt;choco list -localonly&lt;/code&gt;:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;Comments&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/7zip&quot;&gt;7zip&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;18.6&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/7zip.commandline&quot;&gt;7zip.commandline&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;16.02.0.20170209&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/audacity&quot;&gt;audacity&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.3.0&lt;/td&gt;
&lt;td&gt;Audio editor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/becyicongrabber&quot;&gt;becyicongrabber&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.30.0.20161027&lt;/td&gt;
&lt;td&gt;Icon extractor (for creating Chocolatey packages)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/beyondcompare&quot;&gt;beyondcompare&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;4.2.9.23626&lt;/td&gt;
&lt;td&gt;My favourite file comparison tool&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/beyondcompare-integration&quot;&gt;beyondcompare-integration&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.0.1&lt;/td&gt;
&lt;td&gt;Configure Beyond Compare for TortoiseGit/Svn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/dellcommandupdate-uwp&quot;&gt;dellcommandupdate-uwp&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;3.0.0&lt;/td&gt;
&lt;td&gt;Dell&apos;s driver update app&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/dns-benchmark&quot;&gt;dns-benchmark&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.3.6668.0&lt;/td&gt;
&lt;td&gt;Useful DNS checker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/docker-for-windows&quot;&gt;docker-for-windows&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;99.0.0.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/dotnetdeveloperbundle&quot;&gt;dotnetdeveloperbundle&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.3.0.2563&lt;/td&gt;
&lt;td&gt;RedGate&apos;s .NET tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/dropbox&quot;&gt;dropbox&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;41.4.80&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/fiddler&quot;&gt;fiddler&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5.0.20182.28034&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/FiraCode&quot;&gt;FiraCode&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.206&lt;/td&gt;
&lt;td&gt;Nice developer font&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/Firefox&quot;&gt;Firefox&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;57.0.4&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/git&quot;&gt;git&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.20.1&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/GoogleChrome&quot;&gt;GoogleChrome&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;63.0.3239.132&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/iTunes&quot;&gt;iTunes&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;12.9.3.3&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/keepass&quot;&gt;keepass&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.41&lt;/td&gt;
&lt;td&gt;Password manager&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/microsoft-teams&quot;&gt;microsoft-teams&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.1.00.2251&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/mousewithoutborders&quot;&gt;mousewithoutborders&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.1.8.105&lt;/td&gt;
&lt;td&gt;Share mouse across laptop and desktop PCs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/msbuild-structured-log-viewer&quot;&gt;msbuild-structured-log-viewer&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.0.61&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/nodejs&quot;&gt;nodejs&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;11.9.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/notepadplusplus&quot;&gt;notepadplusplus&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;7.6.3&lt;/td&gt;
&lt;td&gt;Using this less now compared to VS Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/nuget.commandline&quot;&gt;nuget.commandline&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;4.9.2&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/obs-studio&quot;&gt;obs-studio&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;22.0.2&lt;/td&gt;
&lt;td&gt;Video / screen recording&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/OctopusTools&quot;&gt;OctopusTools&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5.2.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/Office365ProPlus&quot;&gt;Office365ProPlus&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2016.20170321&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/paint.net&quot;&gt;paint.net&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;4.1.5&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/PDFXchangeEditor&quot;&gt;PDFXchangeEditor&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;7.0.328.2&lt;/td&gt;
&lt;td&gt;My favourite&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/Pester&quot;&gt;Pester&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;4.4.1&lt;/td&gt;
&lt;td&gt;PowerShell unit tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/pingplotter&quot;&gt;pingplotter&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5.8.10&lt;/td&gt;
&lt;td&gt;Useful visual ping network status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/powershell-core&quot;&gt;powershell-core&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;6.1.2&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/procmon&quot;&gt;procmon&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;3.50&lt;/td&gt;
&lt;td&gt;SysInternals Process Monitor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/resharper-clt.portable&quot;&gt;resharper-clt.portable&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2018.3.2&lt;/td&gt;
&lt;td&gt;ReSharper&apos;s free command-line tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/resharper-ultimate-all&quot;&gt;resharper-ultimate-all&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2018.3.2&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/screentogif&quot;&gt;screentogif&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.16&lt;/td&gt;
&lt;td&gt;Handy screen recorder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/skype&quot;&gt;skype&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;8.38.0.138&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/snagit&quot;&gt;snagit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2019.1.0&lt;/td&gt;
&lt;td&gt;Screen grabber&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/sql-server-2017&quot;&gt;sql-server-2017&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;14.0.1000&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/sql-server-management-studio&quot;&gt;sql-server-management-studio&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;14.0.17289.1&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/tailblazer&quot;&gt;tailblazer&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.9.0.536&lt;/td&gt;
&lt;td&gt;Text/log file viewer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/tortoisegit&quot;&gt;tortoisegit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.7.0.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/tortoisesvn&quot;&gt;tortoisesvn&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.11.1.28492&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/ubiquiti-unifi-controller&quot;&gt;ubiquiti-unifi-controller&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5.9.29&lt;/td&gt;
&lt;td&gt;Software for managing UniFi wireless access points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/vagrant&quot;&gt;vagrant&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.2.3&lt;/td&gt;
&lt;td&gt;Manage virtual machines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/visualstudio2017enterprise&quot;&gt;visualstudio2017enterprise&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;15.2.26430.20170605&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/visualstudiocode&quot;&gt;visualstudiocode&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.19.3&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/vsts-cli&quot;&gt;vsts-cli&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.1.4.20190126&lt;/td&gt;
&lt;td&gt;Command line tool for managing Azure DevOps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/vswhere&quot;&gt;vswhere&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.6.7&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/wifiinfoview&quot;&gt;wifiinfoview&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.42&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/windirstat&quot;&gt;windirstat&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.1.2.20161210&lt;/td&gt;
&lt;td&gt;Where&apos;s all that disk space being used?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/wireshark&quot;&gt;wireshark&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2.6.5&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/x-lite&quot;&gt;x-lite&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;5.4.0.94388&lt;/td&gt;
&lt;td&gt;VoIP client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/yarn&quot;&gt;yarn&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.13.0&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://community.chocolatey.org/packages/zoomit&quot;&gt;zoomit&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;4.50.0.20160210&lt;/td&gt;
&lt;td&gt;Great for presentations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;This is also a good basis for refreshing my &lt;a href=&quot;https://gist.github.com/flcdrg/87802af4c92527eb8a30&quot;&gt;Boxstarter scripts&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <id>https://david.gardiner.net.au/2018/07/boxstarter-and-chocolatey-tips</id>
    <updated>2018-07-16T10:00:00.000+09:30</updated>
    <title>Boxstarter and Chocolatey tips</title>
    <link href="https://david.gardiner.net.au/2018/07/boxstarter-and-chocolatey-tips" rel="alternate" type="text/html" title="Boxstarter and Chocolatey tips"/>
    <category term="PowerShell"/>
    <category term="Chocolatey"/>
    <published>2018-07-16T10:00:00.000+09:30</published>
    <summary type="html">Two big things happened earlier this year on the Chocolatey front.</summary>
    <content type="html">&lt;p&gt;Two big things happened earlier this year on the Chocolatey front. First off, &lt;a href=&quot;https://boxstarter.org/&quot;&gt;Boxstarter&lt;/a&gt; (the tool created by Matt Wrock that allows you to script up full Windows installations including handling reboots) is now being managed by Chocolatey. Boxstarter.org still exists, but the source repository is now under the Chocolatey org on GitHub.&lt;/p&gt;
&lt;p&gt;The second is that &lt;a href=&quot;https://blogs.msdn.microsoft.com/commandline/2018/05/08/join-us-for-a-hot-cup-o-chocolatey/&quot;&gt;Microsoft are contributing&lt;/a&gt; Boxstarter scripts in a new GitHub repo – &lt;a href=&quot;https://github.com/Microsoft/windows-dev-box-setup-scripts&quot;&gt;https://github.com/Microsoft/windows-dev-box-setup-scripts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you’re looking to use Boxstarter to automate the software installation of your Windows machines, there’s a few tricks and traps worth knowing about.&lt;/p&gt;
&lt;h2&gt;Avoid MAXPATH errors&lt;/h2&gt;
&lt;p&gt;It’s worth understanding that Boxstarter embeds its own copy of Chocolatey and uses that rather than choco.exe. Due to some compatibility issues Boxstarter currently needs to embed an older version of Chocolatey. That particular version does have &lt;a href=&quot;https://github.com/chocolatey/boxstarter/issues/241&quot;&gt;one known bug&lt;/a&gt; where the temp directory Chocolatey uses to download binaries goes one directory deeper each install. Not a problem in isolation, but when you’re installing a lot of packages all at once, you soon hit the old Windows MAXPATH limit.
A workaround is described in the bug report – essentially using the &lt;code&gt;--cache-location&lt;/code&gt; argument to override where downloads are saved. The trick here is that you need to use this on all choco calls in your Boxstarter script – even for things like choco pin. Forget those and you still may experience the MAXPATH problem.&lt;/p&gt;
&lt;p&gt;To make it easier, I add the following lines to the top of my Boxstarter scripts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;New-Item -Path &quot;$env:userprofile\AppData\Local\ChocoCache&quot; -ItemType directory -Force | Out-Null
$common = &quot;--cacheLocation=`&quot;$env:userprofile\AppData\Local\ChocoCache`&quot;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then I can just append &lt;code&gt;$common&lt;/code&gt; to each choco statement. eg.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cinst nodejs $common
cinst visualstudiocode $common
choco pin add -n=visualstudiocode $common
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Avoid unexpected reboots&lt;/h2&gt;
&lt;p&gt;Detecting and handling reboots is one of the great things about Boxstarter. You can read more in the docs, but one thing to keep in mind is it isn’t perfect. If a reboot is initiated without Boxstarter being aware of it, then it can’t do its thing to restart and continue.&lt;/p&gt;
&lt;p&gt;One command I’ve found that can cause this is using &lt;code&gt;Enable-WindowsOptionalFeature&lt;/code&gt;. If the feature you’re turning on needs a restart, then Boxstarter won’t resume afterwards. The workaround here is to leverage Chocolatey’s support for the windowsfeatures source. So instead of this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;choco install Microsoft-Hyper-V-All -source windowsfeatures $common
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Logging&lt;/h2&gt;
&lt;p&gt;If you have a more intricate Boxstarter script, you may run into some problems that you need to diagnose. Don’t look in the usual Chocolatey.log as you won’t see anything there. Boxstarter logs all output to its own log, which by default ends up in &lt;code&gt;$env:LocalAppData\Boxstarter\Boxstarter.log&lt;/code&gt;. This becomes even more useful when you consider that Boxstarter may automatically restart your machine multiple times, so having a persistent record of what happened is invaluable.
The other things you might want to make use of is Boxstarter-specific commands like &lt;code&gt;Write-BoxstarterMessage&lt;/code&gt; (which writes to the log file as well as the console output) and &lt;code&gt;Log-BoxstarterMessage&lt;/code&gt; (which just write to the log file)&lt;/p&gt;
&lt;p&gt;Find out more about these and other logging commands by running help &lt;code&gt;about_boxstarter_logging&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;My scripts&lt;/h2&gt;
&lt;p&gt;I keep a few of my Boxstarter scripts at &lt;a href=&quot;https://gist.github.com/flcdrg/87802af4c92527eb8a30&quot;&gt;https://gist.github.com/flcdrg/87802af4c92527eb8a30&lt;/a&gt;. Feel free to have a look and borrow them if they look useful.&lt;/p&gt;
&lt;h2&gt;Find out more&lt;/h2&gt;
&lt;p&gt;If you’re really getting in to Chocolatey and Boxstarter, you might also be interested in &lt;a href=&quot;https://web.archive.org/web/20201001020521/https://chocolatey.org/blog/chocolatey-fest-conference-coming-october-8&quot;&gt;Chocolatey Fest&lt;/a&gt;, a conference focusing on Windows automation being held San Francisco on October 8th.&lt;/p&gt;
</content>
  </entry>
</feed>
