This guide explains the features and usage of a custom PowerShell profile designed to improve system navigation, information gathering, maintenance, and Git management. The profile includes multiple aliases for various tasks, along with system utilities and Git functions.
To install this custom PowerShell profile, run the following command in your PowerShell terminal:
irm "https://github.com/PantiesIsStoopid/PowerShell/raw/main/Setup.ps1" | iex
This command will download and execute the PowerShell script that sets up your profile, including aliases, themes, and utility functions.
These aliases provide shortcuts for commonly used directories:
- Touch: Creates a file in your current directory (
Touch FileName.txt
). - Docs: Changes the directory to your user’s Documents folder.
- Dtop: Changes the directory to your user’s Desktop folder.
- DLoads: Changes the directory to your user’s Downloads folder.
- Home: Changes the directory to your user’s home folder.
- Root: Changes the directory to the C: drive.
These aliases help retrieve system information and manage files:
- LA: Lists all files in the current directory with detailed formatting.
- LL: Lists all files, including hidden files, in the current directory with detailed formatting.
- SysInfo: Displays detailed system information (CPU, memory, OS version, etc.).
- GetPrivIP: Retrieves the private IP address of your machine.
- GetPubIP: Retrieves the public IP address of your machine.
- Add
-IncIPv6
to include the IPv6 address as well.
- Add
- SpeedTest: Runs a speed test for your internet connection.
These aliases assist with routine maintenance tasks:
- FlushDNS: Clears the DNS cache to resolve DNS-related issues.
- DelCmdHistory: Deletes all history of commands done in powershell,
- SystemScan: Runs a DISM and SFC scan to repair system files and the Windows image.
- Update: Updates all known applications on your system.
- EmptyBin: Empties the Recycling Bin.
- ClearCache: Clears Windows system caches to free up disk space.
These functions help with file management and system utilities:
- FE: Opens File Explorer in your current directory.
- WinUtil: Opens the Chris Titus Tech Windows utility.
- ReloadProfile: Reloads your PowerShell profile to apply any changes.
- ClearRAM: Cleans up the standby memory in RAM to improve performance.
- ReinstallWinget: Uninstalls Winget and reinstalls it for better package management.
- CalcPi: Calculates pi to 100 digits.
- Shutdown: Shutdown your PC. Add
-Force
to force shutdown. - RPassword : Generates a random password of specified length.
- RandomFact: Prints a random fun fact.
These aliases simplify Git commands for your workflow:
- GL: Shortcut for
git log
. - GS: Shortcut for
git status
. - GA: Shortcut for
git add .
. - GC : Shortcut for
git commit -m "message"
. - GP: Shortcut for
git push
. - G: Changes to your GitHub directory.
- GCom : Adds all changes and commits with a specified message.
- LazyG : Adds all changes, commits with a message, and pushes to the remote repository.
- LazyInit : Initializes a Git repository, adds all files, commits, and sets the remote URL.
Use the CheatSheet alias to display a list of all the most common commands in this PowerShell profile.
The profile is pre-configured with a custom Oh-My-Posh theme to enhance the appearance of the PowerShell terminal, along with a FastFetch theme to provide efficient system stats and directory information.
The setup script ensures that any telemetry or data collection services are opted out to enhance privacy.
This setup can be installed effortlessly via the following one-liner:
irm "https://github.com/PantiesIsStoopid/PowerShell/raw/main/Setup.ps1" | iex