Scripting Intro I (Tutoring)

Since I know you'll be working from multiple operating systems, we're going to start by ensuring we're all operating from a homogenous environment.

To accomplish this, we'll start by SSHing into a Windows 2019 Server to get some hands on practice with PowerShell followed by a Linux Amazon Server to learn Bash

I ask that you review the first paragraph of both PowerShell & Bash articles linked above. They do a better job than myself articulating the differences between a shell, scripting language and command/cmdlet, which are often understandably, incorrectly conflated.

To get started, open your shell/terminal:

  • Mac OS X: Either through Spotlight or Launchpad, search for and select Terminal
  • Windows 10/11: Select the start menu from the bottom right hand corner, or click the Windows key and search for Windows PowerShell (ensure it's not followed by ISE or x86)
  • Linux (Most distros): If there's a graphic front end search for Terminal within Activities/Applications

Now that you've opened your terminal, you're going to connect to the remote servers via SSH.

From your terminal enter the following command: ssh RemoteUser@ec2-3-82-57-38.compute-1.amazonaws.com

You will be prompted for a password as ke-based authentication has been made optional.

Enter the password I've provided in our on-going email chain. I won't list it here, publicly, for obvious reasons.

You've now successfully connected to a Windows Server 2019 instance remotely over SSH.

The terminal you'll find yourself in by default is CMD or Command Prompt, as demarcated by a line about Microsoft Windows, it's version, your current directory and the universal, ubiquitous, prompt symbol >.

Now, Command Prompt is fine for basic tasks but it's a fairly rudimentary shell compared with the power and versatility of PowerShell.

Switching to PowerShell is as simple as entering its name: PowerShell

You'll now see Window PowerShell on the first line and further down PS preceding your prompt

Please proceed to the following post for a brief introduction to PowerShell Fundamentals and return here after reviewing and running a few different cmdlets for yourself.

11:10:40 PM 08/10/2023
Tags: Tutoring PowerShell Bash SSH