In case you missed it, this blog post picks up where Part 1 – Upgrading PowerShell left off. In continuing on with the Git Integration with VS Code blog series, I now present Part 2 – Installing PowerCLI and Git!
NOTE: This process assumes a Windows-based installation, and for the Git install, most of the options were left to defaults unless otherwise noted.
Now that PowerShell has been upgraded, it’s time to install VMware PowerCLI. Doing so is actually a rather simple procedure, assuming the OS has connectivity to the Internet.
- Launch PowerShell as an administrator and run the following command:
Install-Module -name VMware.PowerCLI
- If a NuGet provider is required to continue message appears, press Y and then Enter to install the required NuGet provider.
- If an Untrusted Repository warning message appears, press A then Enter to install the necessary modules from the PSGallery.
- A series of progress bars will appear to document how the installation is progressing, and then that’s it! PowerCLI is now installed!
Upgrading PowerCLI (optional)
If you already have PowerCLI version 6.5.1 or higher installed, upgrading to the latest version is super simple! Although, if you have and older version of PowerCLI installed, you’ll want to completely uninstall that first, and then jump back up to the Installing PowerCLI section.
- Launch PowerShell as an Administrator and run the following command:
Update-Module -name VMware.PowerCLI
- That’s it! It’s that simple!
Now, before we can take advantage of the Git features in Visual Studio Code, we’ll need to install Git first.
- The latest version of Git can be downloaded from the official Git web page over at https://git-scm.com/downloads
- Double-click on the Git exe file. On the Information window, click Next.
- On the Select Destination Location window, choose the folder location where Git should be installed, then click Next to continue.
- On the Select Components window, adjust these options as needed. In this example, I checked Check daily for Git for Windows updates. Click Next to continue.
- On the Select Start Menu Folder window, click Next.
- On the Choosing the default editor used by Git window, click Next.
- On the Adjusting your PATH environment window, click Next.
- On the Choosing HTTPS transport backend window, I changed this to Use the native Windows Secure Channel library due to certificate-related issues I had with an internal GitLab site. (See my previous post, VS Code: Fixing Git Certificate Issues). Then click Next.
- On the Configuring the line ending conversions window, click Next.
- On the Configuring extra options window, click Install.
- The Git installation with then start and copy a number of files to the system.
- When the installation has completed, uncheck the two boxes and click Finish.
At this point, PowerCLI has been updated and Git is now installed. The next part in this Git Integration with VS Code series will be Part 3 – Installing Visual Studio Code. As always, thanks for stopping by!