My Powershell $PROFILE
module.
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"
.
- 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
isDefault
, which installs theDefault.ps1
profile.
- The default value for
- 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
- You may still want to copy your old
- 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 theProfiles/
directory without the.ps1
file extension.- i.e.
-ProfileName Default
would use./Profiles/Default.ps1
- i.e.
- The default custom profile imports the
- create a backup of your existing
- To Set a specific profile, pass a parameter
- 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
.
See the Developing docs
See the Notes documentation pages
Check the docs for useful links