My Powershell $PROFILE module.
Warning
This script overwrites your Powershell $PROFILE. Make sure to take a backup of that
before running any of the scripts in this repository, especially if you've done
any customization previously.
You can backup your current profile with:
Copy-Item -Path "$($PROFILE)" -Destination "$($PROFILE).orig"To restore it later, run:
Copy-Item -Path "$($PROFILE).orig" -Destination "$($Profile)"My PowerShell $PROFILE is modular and component based. It will intelligently load functionality based on what is currently installed/configured on a machine, and the options used when running the install script.
By default the profile customizes the $PROMPT and adds custom functions, aliases, and handles third-party software initialization and shell completions.
This profile is highly specific to my preferences and tooling. It supports Oh-My-Posh and Starship shells, and has custom PowerShell readline handlers to improve efficiency and make PowerShell a little more pleasant to use.
The profiling script shows the initialization steps the profile takes, enabling troubleshooting when the profile takes a long time to load.
The profile starts in ~530ms on a machine with antivirus installed. It is nearly instant on machines with no antivirus. I have spent a lot of time profiling and optimizing the startup sequence for the profile so I'm not waiting at my prompt for things to finish initializing.
Note
These instructions assume you are installing the monolith profile.
- Clone the repository with
git clone https://github.com/redjax/PowershellProfile.git(or via SSH withgit clone git@github.com:redjax/PowershellProfile.git) cdinto thePowershellProfile\directory- Run
.\Install-MonoProfile.ps1 -Prompt default -Force- See usage/help menu with
Get-Help .\Install-MonoProfile.ps1 -Detailed
- See usage/help menu with
- Download a release from the releases page
- Extract the archive somewhere on your machine
- Run the included
Install-MonoProfile.ps1script- To see install script usage, run
Get-Help .\Install-MonoProfile.ps1 -Detailed
- To see install script usage, run
To see a unified list of both functions and aliases exported by this profile, run: Show-ProfileFunctions.
To see a full list of the functions exported by this profile, run: Show-ProfileModuleFunctions.
To see a full list of the aliases exported by this profile, run: Show-ProfileModuleAliases.
This repository includes a number of custom modules in the Modules/Custom path. These modules can add additional functionality to your $PROFILE, like providing Unix-like aliases (i.e. which -> where), networking utility functions, and some fun ones like a module for checking the weather.
Run the Remove-CustomModulesDir.ps1 script to uninstall all custom modules. This does not affect your custom profile, only the modules in the profile path's CustomModules/ directory.
See the Developing docs
See the Notes documentation pages
Check the docs for useful links