I have a Power Shell Module that references a number of PS1 files.
. $PSScriptRoot\vs-command.ps1
. $PSScriptRoot\open.ps1
. $PSScriptRoot\git.ps1
. $PSScriptRoot\build.ps1
. $PSScriptRoot\deploy.ps1
. $PSScriptRoot\count.ps1
. $PSScriptRoot\tab.ps1
. $PSScriptRoot\test.ps1
. $PSScriptRoot\nuget.ps1
. $PSScriptRoot\checkforxml.ps1
This PSM1 file is held in the location of Documents\WindowsPowerShell\Modules and currently ties in to the PS1 files referenced above.
The files above perform a number of actions on visual studio projects \ solutions and i now have a requirement for each of the files to be held in their own folder within the solution folder.
I need to find a way of switching the $PSScriptRoot while the same PowerShell window is open.
So.... the requirement is... initial load of these files so i have the basic commands that I would expect... then... when i switch into a Solution Folder held in d:\slns it will detect the root has changed and then pick up the new ps1 files. .
I am very new to powershell so would be very grateful for all help and information.
thanks