title: How to install (v142) Build tools in Visual studio 2022 through powershell
body: <p>So I know installing build tools in Visual Studio using the IDE/UI is fairly simple.
  However, I'd like to install them using powershell.</p>
  <p>So far I've tried downloading the boostraper, such as &quot;vs_community.exe&quot; and using the following command:</p>
  <pre><code> .\vs_community.exe modify --add --quiet Microsoft.VisualStudio.Component.VC.Tools.x86.x64 
  --channelId VisualStudio.17.Preview --ProductId Microsoft.VisualStudio.Product.Community
  </code></pre>
  <p>I need it to be &quot;quiet&quot; because I'm doing this to automate some processes.</p>
  <p>However, the result of this is not having any changes.
  I should be able to see soemthing like this when running:</p>
  <pre><code>(Get-VSSetupInstance | Select-VSSetupInstance -Product *).packages | select -ExpandProperty Id
  </code></pre>
  <p>I would expect to see something like this:</p>
  <pre><code>Microsoft.VisualStudio.PackageGroup.VC.Tools.x64.ARM64
  Microsoft.VisualStudio.PackageGroup.VC.Tools.x86
  Microsoft.VisualStudio.Component.VC.Tools.x86.x64
  </code></pre>
  <p>(and many more)</p>
  <p>However, I see nothing, no packages installed.</p>