Level 1
0 / 100 XP

Starting a Remote Session Answer

03 (Answer) Starting a Remote Session

**From the Host computer open Virtual Studio Code (VSC)
Again, this is not a VSC course, **but I will show you a few things about VSC, enough to pique your interest so that you will explore and learn more. At the end of this lesson, I have a link , check it out!

On the left, notice that I have all my scripts listed for easy access, I’ll show you how to do this:
From the Host computer I created a folder called VSC scripts. An easy way to create a script is to open any txt editor, paste your script and rename the file .ps1. Now from File, Open Folder, choose your folder and there you go, access to all your scripts. If you want you can stop the video now and create your folder structure, or just move along with our Remote Session.
**
From the student guide copy and paste this command into the Terminal section of VSC.**

Here's the command:
Enter-pssession -computername vsc1 -credential administrator
You may need to enable the administrator account.
To check your administrator account open virtual box or hyper-v and start your VM called VSC1 – Stop the video while you do this.

(From VSC1, use Computer Management, Local users and groups, users, Administrator, uncheck Account is disabled) By default the local Administrator account is disabled.

Here is the explanation:

  • This command is used to establish a remote PowerShell session (PSSession) with a computer named "VSC1" using the "administrator" credentials. Let's break it down step by step:
  • Enter-PSSession : This is a PowerShell cmdlet that is used to start an interactive remote PowerShell session. It allows you to establish a connection to a remote computer and work with it as if you were sitting in front of it. Once the session is established, you can execute commands on the remote computer.
  • -ComputerName VSC1: This part of the command specifies the target computer to which you want to…