Reputation: 18636
I created a cmdlet *.ps1
file with a single function Backup-Data
that I load into my $profile
with Import-Module Backup-Data.ps1
.
Everytime I test it, I save the file and reopen the powershell console but this process is very tedious. So, I was wondering whether there is a way to call that directly from the console?
Upvotes: 0
Views: 59
Reputation: 174445
Unless you're defining new types in the Backup-Data.ps1
script, the following should suffice for restarting your testing in an interactive session:
Remove-Module Backup-Data -Force
Import-Module Backup-Data.ps1
Upvotes: 1