Gui Powershell
Hi, We are to execute a ps1 file that displays a gui in the remote computer but we are getting the error
C:\WINDOWS\AdminArsenal\PDQDeployRunner\service-1\exec>powershell.exe -executionpolicy bypass -file "CustomRestart.ps1" Exception calling "ShowDialog" with "0" argument(s): "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application." At CustomRestart.ps1:343 char:9 return $MainForm.ShowDialog() ~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [], MethodInvocationException FullyQualifiedErrorId : InvalidOperationException
PS1--> https://gallery.technet.microsoft.com/scriptcenter/Custom-PowerShell-GUI-7c7fbda8
Is there any way we can get that gui to display in the remote computer?
Comments
I believe that script is designed to be ran as the logged on user - which context is your package running the powershell step as? Step -> Options -> Run As...
i executed with administrator priviliege
Needs to run as deploy user (interactive). The account doing the deployments should be a service account with admin rights. That's the correct way to do this.