Giter VIP home page Giter VIP logo

my-powershell-config's Introduction

🔥 My Powershell Config

My Windows Powershell configuration with oh-my-posh and PSReadline.

r3nanp license mit



Prerequisites

You should use a modern console host like ConEmu, Alacritty, Terminus, Hyper, FluentTerminal, or the official Windows Terminal to have a great terminal experience on Windows. ⚠

Techologies used

How to active the scripts execution in Powershell?

  • This command will show which policy is active
Get-ExecutionPolicy

Policy table

Restriced AllSigned RemoteSigned Unrestriced ByPass
No script can be run. Windows Powershell can only be used in interactive mode. Only scripts signed by a trusted publisher can run. Download scripts must be signed by a trusted publisher before they can be run. No restrictions. All scripts can be run, but download scripts will prompt for permission before it runs. All scripts can be run, without warnings or prompts.

Example: My Powershell is using RemoteSigned policy

Hyper

  • This command will change your policy:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

How to install PSReadline and oh-my-posh

  • Install PSReadline
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
  • If you don't have an -AllowPrerelease flag, upgrade PowerShellGet with:
Install-Module -Name PowerShellGet -Force first.
  • Install oh-my-posh
Install-Module oh-my-posh -Scope CurrentUser

(Not necessary)

  • Install Get-ChildItemColor
Install-Module -Name Get-ChildItemColor -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber

Configure Powershell profile

  • Into your powershell, execute this command:
if (!(Test-Path -Path $PROFILE )) { 
  New-Item -Type File -Path $PROFILE -Force 
}

# To open in visual studio code, but you can change it
code $PROFILE

my-powershell-config's People

Contributors

r3nanp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

coco1012

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.