A functional and enhanced PowerShell environment, initially based on ChrisTitusTech's Powershell Profile, now providing a structured and customizable experience. This repository contains two key profile components: a self-updating base profile and an advanced user profile with extra features.
- Base Profile (
Microsoft.Powershell_profile.ps1
):- Auto-updates from this repository.
- Integrations: Starship, Zoxide (auto-install attempt), Terminal-Icons, Chocolatey.
- PSReadLine enhancements (custom colors, keybindings, history).
- Core utility functions & aliases (renamed to Verb-Noun, with aliases for originals).
- Comment-Based Help for functions.
- Admin prompt indicator.
- Advanced Profile (
profile.ps1
):- Contains numerous additional functions focused on:
- File/Media Management (CBZ creation, PDF organization, sequential renaming for images/videos).
- Image Processing (via ImageMagick dependency).
- Video Info (via ffprobe dependency).
- Git integration helpers.
- Folder creation utilities.
- And more...
- Extensive Comment-Based Help.
- Robust dependency checking for its advanced features.
- Optionally installed during setup to
$PROFILE.CurrentUserAllHosts
.
- Contains numerous additional functions focused on:
This repository contains the following core scripts:
Microsoft.Powershell_profile.ps1
: The self-updating base profile installed to$PROFILE
. See features above.profile.ps1
: The advanced user profile script. (See Documentation)HelperFunctions.ps1
: Shared functions required by both profile scripts.setup.ps1
: The setup script used for installation.
Execute the following command in an elevated PowerShell window to run the setup script:
PowerShell
irm "https://undersc.red/profile" | iex
What the installer does:
- Checks for Admin rights and Internet connectivity.
- Installs dependencies: Chocolatey, Winget packages (Starship, Zoxide, Eza), PowerShell Modules (Terminal-Icons), and Nerd Fonts (Cascadia Code).
- Installs the Shared Helper Functions (
HelperFunctions.ps1
) required by the profiles. - Installs the Base Profile (
Microsoft.Powershell_profile.ps1
) (which uses the helpers) to$PROFILE
, backing up any existing file. - Prompts you whether to download and install the Advanced Profile (
profile.ps1
) (which also uses the helpers) to$PROFILE.CurrentUserAllHosts
, backing up any existing file.
Restart your PowerShell session after the setup completes!
The base profile (Microsoft.Powershell_profile.ps1
) is designed to auto-update from this repository.
Microsoft.Powershell_profile.ps1
file located at $PROFILE
! Your changes will be overwritten during updates.
The correct way to add your own customizations:
All your personal aliases, functions, variables, and settings should go into the profile script located at $PROFILE.CurrentUserAllHosts
.
This file is loaded after the base profile, allowing you to override settings or add your functionality. After restarting PowerShell post-setup, you can easily open this file using the alias ep
. (This runs the Open-UserProfileScript
function).
Based on your choice during setup:
- If you chose YES to download the advanced profile:
- The
Edit-Profile
orep
command will openprofile.ps1
(which was downloaded to$PROFILE.CurrentUserAllHosts
). - You can modify this file, remove functions you don't need, or add your own alongside the existing advanced functions.
- The
- If you chose NO to download the advanced profile:
- The
Edit-Profile
orep
command will open$PROFILE.CurrentUserAllHosts
. This file might be empty or non-existent initially (the command will create it if needed when opened by editors like VS Code or Notepad). - Add all your custom aliases, functions,
$env:
settings, module imports, etc., into this file.
- The
This ensures your personal configurations are preserved across updates to the base profile.
Now, enjoy your enhanced and stylish PowerShell experience! 🚀