Creating a Fine Tuned Powershell Script - jwells24/Tech-Journal GitHub Wiki

Creating a Powershell Script

  • In this tech journal entry, I will be going over some of my takeways from creating a powershell script for creating clones and base vms. First, I'm going to quickly run through how to download VSCode on xubuntu-wan, then dive into the coding aspect.

  • A link to the final source code of my script can be found here:

Installing VSCode on xubuntu-wan

  1. Run the following commands below, in order, to install VSCode on your xubuntu-wan box.
sudo apt update

sudo apt install software-properties-common apt-transport-https wget -y

wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"

sudo apt install code
  1. Now, that vscode is installed, we also want to add the powershell extension. Do this by navigating to extensions, and installing powershell.

image

Creating our Powershell Script