- creating custom modules (basically our own cmdlets)
- Adding them to the
$profile
so they load on start
Create a module and save it in the global modules folder as "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ModuleName\ModuleName.psm1".
- Fire up powershell and type in the following:
notepad.exe $profile
Import-Module *module-name* -Force
Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1'
Import-Module startclass -force
Import-Module stopclass -force
Import-Module refreshcodeenv -force
Import-Module automern -force
Import-Module code -force
Import-Module hyper -force
Import-Module slack -force
Import-Module sourcetree -force
Import-Module zoom -force
Import-Module bye -force
The folder name you save it to in the module folder MUST match the module name.
stop-class
MUST be located in
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ stop-class
your files must be saved as .psm1
files in order to work as modules.