Setting Up Environment - Foren-Ken/tech-journal GitHub Wiki

Powershell Basics

Windows Powershell is Microsoft's shell which combines the CMD functions of CMD prompt with new functionality by incorporating scripting and cmdlet elements. Powershell is a cross-platform task automation and config solution made of command-line shells.
A shell script is multiple commands in sequence. Usually referring to Bash commands, this is expended to Powershell commands.
The goal of scripts is to automate monotonous tasks.

What is an IDE and a ISE?

An IDE is a software application which facilitates the ability to write, edit, debug, and manage code.
An ISE is a specialized environment for testing and writing scripts. This is designed to help with automation.

Execution Policies

Powershell has multiple different execution policies which are meant to protect the computer from malicious scripts from running. This is likely to get in the way of the custom scripts, so it needs to be modified.
The following are the available execution policies:

  • AllSigned
    Requires all scripts to have trusted publishers. Notifies the user when untrusted scrips are ran. Can run signed yet malicious scripts.
  • Bypass
    Nothin is blocked. No warning, no prompts.
  • RemoteSigned
    Same as AllSigned for all script which originate from outside the local computer. Does not restrict scripts ran on the local computer.

To change execution policies, the following can be set: Set-ExecutionPolicy -ExecutionPolicy [NAME OF EXECUTION POLICY] -Scope LocalMachine