How to do it...

Installing Visual Studio Code is simple.

  1. If your Linux distribution has a software store, search the store for Visual Studio Code.
  2. If you find Visual Studio Code, install the package from there. If not, proceed with the next step.
  3. The package name for Visual Studio Code is code. Use your package manager to search for the package in the repository. On Ubuntu, the command would be:
$ sudo apt-cache pkgnames code
  1. If you're able to find the package in your repository, install vscode like you would any other package.
$ sudo apt install code
  1. If you were unable to find the package, go to https://code.visualstudio.com/Download and download the right code package for your distro.
  2. To install VS Code, call your package manager with the path to the downloaded package.
$ sudo apt install install code_version_arch.deb
  1. If you would rather install VS Code in portable mode, download the VS Code tarball and extract its contents to a convenient location to run VS Code. Although, remember that updates to VS Code would be handled by VS Code itself, in this case.

Visual Studio Code is a powerful code editor in itself. However, it may not fully support PowerShell right out of the box. You would need to install the extension that packs capabilities which help run write and run PowerShell scripts.

  1. Launch Visual Studio Code.
  2. Click on the Extensions icon or press Ctrl+Shift+X to go to the Extensions pane.
  3. In the search bar, enter powershell publisher:Microsoft and hit Enter to search for the PowerShell package.
  4. Click on Install in the resulting package–the PowerShell package should be on top.
  5. Once the installation completes, click on Reload to reload Visual Studio Code with PowerShell capabilities.

You are now ready to develop PowerShell scripts using a friendly editor that supports almost all of the capabilities that Windows PowerShell Integrated Scripting Environment has, and more!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.161.116