Skip to content

redjax/PowershellProfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Powershell Profile

Created At Last Commit Commits this year Repo size

My Powershell $PROFILE module.

Documentation

This repository includes a module named ProfileModule, which is a package of custom functions, variables, & aliases I set in my scripts, effectively turning my $PROFILE into a module. This repository includes swappable Powershell profiles.

All Profiles load from a common base profile.

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".

Table of Contents

Usage

  • Clone the repository
  • Run Install-CustomProfile.ps1
    • To Set a specific profile, pass a parameter -ProfileName <name>, where <name> is a file in the Profiles/ path, without the .ps1 filename
      • The default value for $ProfileName is Default, which installs the Default.ps1 profile.
    • This script will:
      • create a backup of your existing $PROFILE at $($PROFILE).bak.
        • You may still want to copy your old $PROFILE, like:
          • cp $PROFILE "$($PROFILE).orig"
          • This will prevent accidentally nuking any customizations you've made to your $PROFILE
      • Update the module's manifest file, ensuring all functions & aliases are exported properly.
      • Copy the ProfileModule directory (the custom profile module) to your Modules/ directory in the same path as your $PROFILE.
      • Copy/update a custom profile (default: Default.ps1) to your machine's $PROFILE location.
        • The default custom profile imports the ProfileModule, loading all custom functions and setting the shell's session to my custom profile module.
        • To use a different profile, pass a -ProfileName <profilename>, where <profilename> is the name of a file in the Profiles/ directory without the .ps1 file extension.
  • Restart your shell

To see a full list of the functions exported by this module, run: Get-Command -Module ProfileModule -Commandtype Function.

To see a ful list of the aliases exported by this module, run: Get-Command -Module ProfileModule -CommandType Alias.

Developing

See the Developing docs

Notes

See the Notes documentation pages

Links

Check the docs for useful links

About

My Powershell profile module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published