注意:PowerShell 1.0 我想获取当前正在执行的PowerShell文件名.也就是说,如果我像这样开始我的会话:
powershell.exe .\myfile.ps1
我想得到字符串".\ myfile.ps1"(或类似的东西).编辑:"myfile.ps1"是首选. 有任何想法吗?
powershell
powershell ×1