Running remote GUI app in Powershell

后端 未结 2 1409
耶瑟儿~
耶瑟儿~ 2020-12-05 03:16

We have a custom comonent that wraps some of the functionality of powershell so it can be used frim BizTalk 2006. For most operations (checking a file path, copy or move a

2条回答
  •  天命终不由人
    2020-12-05 03:50

    Using standard PowerShell methods (WinRM, WMI) you can't launch applications with GUI. The only solution I know about is to use PsExec from SysInternals (or similar tools). It can launch applications which present GUI to the user. Your command line will look like this:

    & ".\psexec" -accepteula -i "\\computername" -u "domain\username" -p "password" "command line"
    
    • -accepteula — silently accept EULA.
    • -i — allow GUI.

    Other solutions are more hacky, including remote adding of tasks to the scheduler.

提交回复
热议问题