From PowerShell, I can “calculate the source” of another PowerShell program. I can execute it as if it were written inside the first. Example:
Write-Host 'before'
. MyOtherProgram.ps1
Write-Host 'after'
MyOtherProgram is 'included' inside the main program, just as if its contents were copied / pasted.
The problem is that I can only specify the source with a file name ending with .ps1
I cannot with MyOtherProgram.liborMyOtherProgram.whatever
Does anyone have a way to calculate a PowerShell script source that doesn't end in .ps1?
source
share