GUI runs on Windows 10 but not on Server 2016

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 months and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
jonathan.byers@gd-ms.com
Posts: 2
Last visit: Tue Feb 06, 2024 5:41 am

GUI runs on Windows 10 but not on Server 2016

Post by jonathan.byers@gd-ms.com »

I have a GUI to deploy a VM from template and it runs correctly on Windows 10/11, but not on a Windows 2016 terminal server. The script is setup with dropdowns that populate based on the previous box. Example, users choose the vCenter, then Datacenter, cluster, network, datastore, and base template.

1. Choose vCenter -> (in background, runs commands to get datacenter)
2. Choose Datacenter -> (in background, runs commands to get cluster)
and so on.

Running the commands manually in Powershell works, but not in the GUI. Any ideas? or Ideas on how to troubleshoot?
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: GUI runs on Windows 10 but not on Server 2016

Post by Alexander Riedel »

"Not work" usually involves an error message. If you run it in the debugger you should see those.
If you package as a Windows Forms app, errors get 'eaten' so to speak unless you have a mechanism to log them.
You can package as a console exe which would display errors in the console alongside your form.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 11 months and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked