Git Integration with VS Code: Part 2 – Installing PowerCLI and Git

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.

Installing PowerCLI

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:
    01-PowerCLI-Install-Module-VMware-PowerCLI

    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.
    02-PowerCLI-NuGet-Provider
  • If an Untrusted Repository warning message appears, press A then Enter to install the necessary modules from the PSGallery.
    03-PowerCLI-Untrusted-Repository
  • A series of progress bars will appear to document how the installation is progressing, and then that’s it! PowerCLI is now installed!
    04-PowerCLI-Installing

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!

Installing Git

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.
    01-Git-Install-Information
  • On the Select Destination Location window, choose the folder location where Git should be installed, then click Next to continue.
    02-Git-Install-Select-Destination-Location
  • 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.
    03-Git-Install-Select-Components
  • On the Select Start Menu Folder window, click Next.
    04-Git-Install-Select-Start-Menu-Folder
  • On the Choosing the default editor used by Git window, click Next.
    05-Git-Install-Choosing-the-Default-Editor
  • On the Adjusting your PATH environment window, click Next.
    06-Git-Install-Adjusting-your-PATH-environment
  • 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.
    07-Git-Install-Choosing-HTTPS-Transport-Backend
  • On the Configuring the line ending conversions window, click Next.
    08-Git-Install-Configuring-the-Line-Ending-Conversions
  • On the Configuring extra options window, click Install.
    10-Git-Install-Configuring-Extra-Options
  • The Git installation with then start and copy a number of files to the system.
    11-Git-Install-Installing
  • When the installation has completed, uncheck the two boxes and click Finish.
    12-Git-Install-Setup-Complete

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!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s