访问当前 PowerShell 实例
在 PowerShell 脚本中,可以使用 $PSBoundParameters 变量来引用当前 PowerShell 实例。例如,以下代码将使用 $PSBoundParameters 变量输出当前 PowerShell 实例的路径:
Write-Host $PSBoundParameters['MyInvocation'].MyCommand.Path
输出结果:
C:\Users\UserName\Desktop\MyScript.ps1
上一篇:access存储云数据库吗
下一篇:accessc游标数据库