Import module into all PowerShell Sessions
While testing some stuff, I wanted to keep all PowerSploit modules that I need to be automatically loaded into powershell when I open a session(window). To do so, we need a profile file for PowerShell that acts like .bashrc
in Linux or .bash_profile
in MacOS.
Step #1 | Get Powershell profile path
In your powershell, print the profile
a variable that stores the powershell profile default path.
This file does not exist by default, so you have to create it manually.
Step #2 | Add Your modules
I keep my stuff in Downloads
directory, so here I load all the modules I need
Save and close, duh!
Step #3 | Load your Profile
Now, when you open a new powershell session (window), run the following
Resources
PreviousRuby | How to Send an email from Microsoft ExchangeNextHow to create a Github Action to publish a Ruby gem to Rubygems.org
Last updated