I have directory structure that looks like this:
C:TFSMasterScriptScript1.ps1
C:TFSChildScriptScript2.ps1
What i want to do is specify the relative path in Script2.ps1 to look for Script1.ps1 in the directory hirearchy.
This is what i tried in Script2.ps1:
Import-Module ../MasterScript/Script1.ps1
but it does not work and says it cannot find the module.
If i say Import-Module C:TFSMasterScriptScript1.ps1
, it works fine.
What am i missing here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…