Welcome PowerShell's $uperUser
^30d814
To The Windows Terminal, Console and Command-Line repository
- Description
- Directory Structure
- How to Setup
- How this Works
- How to Contribute
- Installing and running New Windows Terminal
- Welcome Terminal Log
Microsoft Window Terminal Profile : SuperUser
Sanjeev_Stephan_Murmu
Version | Release Date |
---|---|
v2.0 | 30th May 2023 |
This PowerShell Repository comprises the index of all the usefull functions and scripts for the window terminal
- 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
By Default PowerShell Executions is restricted for CurrentUser
.
- 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
- 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
- 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
- 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
- Verify The Powershell Installation by checking its version using below command
$PSVersionTable
- 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\
- Now Clone the "superuser' repository using bellow command
git clone https://github.com/SanjeevStephan/superuser.git
- Now you will see a folder named SuperUser, renamed it to PowerShell
mv superuser PowerShell
- Open Environment Variable using below Command
rundll32.exe sysdm.cpl,EditEnvironmentVariables
- Add a new environment-variable named
superuser
Key : superuser
Value : C:\Users\<Username>\OneDrive\Documents\PowerShell\superuser.ps1
- Now Restart the Terminal & switch to powerShell 7
- Check if the system recognize the 'environment-variable' we just added
echo $env:superuser
echo $env:superuser_data
echo $env:superuser_profile
- If all the things went well you will be greeted by the terminal,similarly like this. CLick here to see the log
To know how this profile script works. Kindly click here to read the docs
To know how you can contribute to this repository. Kindly Click here
Note: Windows Terminal requires Windows 10 2004 (build 19041) or later
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)
- You must be running Windows 10 2004 (build >= 10.0.19041.0) or later to run Windows Terminal
- You must enable Developer Mode in the Windows Settings app to locally install and run Windows Terminal
- You must have PowerShell 7 or later installed
- You must have Git installed
- You must have at least VS 2022 installed or Visual Studio Code popularly known as VSCode
- You must install the .NET Framework Targeting Pack to build test projects
- This Github Repository (https://github.com/SanjeevStephan/superuser)
- Microsoft Windows Terminal Repository (https://github.com/microsoft/terminal)
- PowerShell v7+ (https://github.com/PowerShell/PowerShell/releases/latest)
- Download PowerShell-7.3.3-win-x64.zip
- Download git for terminal