正在计划在服务器上运行powershell脚本-正在查找powershell.exe



我正在计划一个powershell脚本在服务器上运行。我使用了$env:PSModulePath,其中一个powershell位置是c:\windows\system32\windowsPowerShell\v1.0\Modules。当我查找该位置时,那里没有powershell.exe。我想用它作为系统调度程序中的应用程序名称。如何验证Powershell.exe是否存在?我还想找到上面使用$env命令看到的所有powershell版本的每个版本,以验证哪个版本是我在计算机上测试的5.1版本。

env:PSModulePath

c:windowssystem32windowsPowerShellv1.0Modules是模块目录

$psHome返回.exe位置

最新更新