Skip to content

SanjeevStephan/superuser

Repository files navigation

Welcome PowerShell's $uperUser

^30d814

To The Windows Terminal, Console and Command-Line repository

Powerful Window Automations Script

Terminal Log

Index

SYNOPSIS

Microsoft Window Terminal Profile : SuperUser

Author

Sanjeev_Stephan_Murmu

Version

Version Release Date
v2.0 30th May 2023

Description

This PowerShell Repository comprises the index of all the usefull functions and scripts for the window terminal

Directory Structure

  • Main
File Description Explaination
Microsoft.PowerShell_profile.ps1 Main PowerShell Profile File ReadMe
superuser.ps1 c ReadMe
Auto-Discover.ps1 Includes all {*.ps1} files in the ./dependency directory ReadMe
The-Prompt.ps1 The SuperUser Prompt ReadMe

For In-Detail Explaination | Please refer to My Detailed Guide

How to Setup

By Default PowerShell Executions is restricted for CurrentUser.

  1. Firstly, PowerShell execution policy is required to be one of: Unrestricted, RemoteSigned or ByPass to execute the installer. For example:
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

For Windows 11

  1. Install Git From Terminal via Winget tool Install winget tool if you don't already have it, then type this command in command prompt or Powershell.
winget install --id Git.Git -e --source winget

3.Install PowerShell using Winget (recommended)
The following commands can be used to install PowerShell using the published winget packages:

winget search Microsoft.PowerShell
  1. You'll get Output below like this
Name               Id                           Version Source
---------------------------------------------------------------
PowerShell         Microsoft.PowerShell         7.3.4.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.4.0.3 winget
  1. Now Install PowerShell or PowerShell Preview using the id parameter
winget install --id Microsoft.Powershell --source winget

or

winget install --id Microsoft.Powershell.Preview --source winget

Note : You have to execute any one of the command and not both
You should the success message like this below

Found PowerShell [Microsoft.PowerShell] Version 7.3.4.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Successfully installed
  1. Verify The Powershell Installation by checking its version using below command
$PSVersionTable

Downloading & Installing SuperUser Script

  1. Open Terminal & navigate to User's home directory
    For Windows 11 : C:\Users\<username>\OneDrive\Documents\
    For Windows 10 : C:\Users\<username>\Documents\

Using Below Command

cd $home\OneDrive\Documents\
  1. Now Clone the "superuser' repository using bellow command
git clone https://github.com/SanjeevStephan/superuser.git
  1. Now you will see a folder named SuperUser, renamed it to PowerShell
mv superuser PowerShell
  1. Open Environment Variable using below Command
rundll32.exe sysdm.cpl,EditEnvironmentVariables
  1. Add a new environment-variable named
    superuser
        Key : superuser 
        Value : C:\Users\<Username>\OneDrive\Documents\PowerShell\superuser.ps1
  1. Now Restart the Terminal & switch to powerShell 7
  2. Check if the system recognize the 'environment-variable' we just added
 echo $env:superuser
 echo $env:superuser_data
 echo $env:superuser_profile
  1. If all the things went well you will be greeted by the terminal,similarly like this. CLick here to see the log

How this Works?

To know how this profile script works. Kindly click here to read the docs

How to Contribute

To know how you can contribute to this repository. Kindly Click here

Installing and running New Windows Terminal

Note: Windows Terminal requires Windows 10 2004 (build 19041) or later

Additional Settings for Window 11 (New Microsoft Terminal)

Go To Settings and do the following to maximize productivity

  • Change th Default Profile from Windows PowerShell {5.3} to PowerShell {7.3}
  • Change the Default Terminal Application from Let Window Decide to Windows Terminal
  • Toggle ON -> Launch on machine startup (if you want the window to open terminal at launch)

Prerequisites

LINK