Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 在ps1工具中启动ps1文件_Powershell_User Interface_Launch - Fatal编程技术网

Powershell 在ps1工具中启动ps1文件

Powershell 在ps1工具中启动ps1文件,powershell,user-interface,launch,Powershell,User Interface,Launch,您好,我已经创建了一个启动中央故障排除应用程序的工具,但我最近创建了另一个工具ps1文件,我似乎无法从另一个工具启动它 function LaunchQuickNotes { try { Start-Process -filePath "\\c\s\CAF1\ITSC Second Line Support\Craig Heckles Team\GUI\Admin Tool\QuickNotes Tool\QuickNotes tool - Tier 1.ps1" - Log

您好,我已经创建了一个启动中央故障排除应用程序的工具,但我最近创建了另一个工具ps1文件,我似乎无法从另一个工具启动它

function LaunchQuickNotes {

try { 
    Start-Process -filePath "\\c\s\CAF1\ITSC Second Line Support\Craig Heckles Team\GUI\Admin Tool\QuickNotes Tool\QuickNotes tool - Tier 1.ps1" -
    LogWrite "Quick Notes launched" 
} 
catch {
    $wshell = New-Object -ComObject Wscript.Shell
    $wshell.Popup("Unable to launch Quick Notes.",0,"Error",0)
}
我觉得它似乎只是打开了.txt文件,而没有在powershell中启动

任何建议,而不是

Start-Process -filePath "\\c\s\CAF1\ITSC Second Line Support\Craig Heckles Team\GUI\Admin Tool\QuickNotes Tool\QuickNotes tool - Tier 1.ps1" -
试一试

而不是

Start-Process -filePath "\\c\s\CAF1\ITSC Second Line Support\Craig Heckles Team\GUI\Admin Tool\QuickNotes Tool\QuickNotes tool - Tier 1.ps1" -
试一试


调用函数
LaunchQuickNotes
以启动它。函数名为LaunchQuickNotes?我使用$btn\u QuickNotes调用函数。添加单击({LaunchQuickNotes})调用函数
LaunchQuickNotes
以启动它。函数名为LaunchQuickNotes?我使用$btn\u QuickNotes调用函数。添加单击({LaunchQuickNotes})非常感谢,如果有助于解决您的问题,请将答案标记为解决方案。非常感谢,如果有助于解决您的问题,请将答案标记为解决方案。