Powershell的相对路径,我想指的文件,该文件是在同一回购的PowerShell脚本相对路径。到回购文件
我有以下目录结构。
repo/
├── files
│ └── scripts.sh
│
├── powershell_scripts
└── my_powershell.ps1
在
my_powershell.ps1
我要引用scripts.sh
。我试图在PowerShell脚本中使用$PSScriptRoot
,但它没有按照我想要的方式工作。
我想my_powershell.ps1
皮卡scripts.sh
与目录结构。
有谁知道如何做到这一点?
感谢
我看你有没有PSV2列为标签。你真的会在版本2上运行这个吗? – TheMadTechnician
对PowerShell的V3.0运行它 – roy