Powershell 在ps1工具中启动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
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})非常感谢,如果有助于解决您的问题,请将答案标记为解决方案。非常感谢,如果有助于解决您的问题,请将答案标记为解决方案。