Gui for customers

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.
Locked
User avatar
danarstevenson
Posts: 8
Joined: Fri May 13, 2016 12:19 pm

Gui for customers

Post by danarstevenson » Mon Nov 05, 2018 2:06 pm

Product, version and build: 5.5.155
32 or 64 bit version of product:64
Operating system:2016
32 or 64 bit OS:64

Greetings,

I am looking for a little direction pls, I would like to present a gui through a form but have the actual action run on the source server. So for example, VM snapshots , I have a specific version of Powercli on a VM to run the snapshots for the user so they do not have to have actual login to vCenter. But be able to present ad hoc snapshot capability to them. I thought i had it but more i tested it showed they were running it locally instead of on the source server.

Any direction would help , and thank you.
Dana

User avatar
davidc
Posts: 5646
Joined: Thu Aug 18, 2011 4:56 am

Re: Gui for customers

Post by davidc » Mon Nov 05, 2018 2:50 pm

[TOPIC MOVED TO POWERSHELL GUIS FORUM BY MODERATOR]
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5646
Joined: Thu Aug 18, 2011 4:56 am

Re: Gui for customers

Post by davidc » Mon Nov 05, 2018 3:06 pm

You can use Invoke-Command to run cmdlets remotely.

Alternatively, you can create a separate runspace that connects to the remote machine. This way you can run the GUI in locally and use the runspace to execute commands on the remote machine.

I will let the community experts chime in on this.
David
SAPIEN Technologies, Inc.

User avatar
jvierra
Posts: 13177
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Gui for customers

Post by jvierra » Mon Nov 05, 2018 3:18 pm

You can more easily use Invoke-Command with "AsJob' which will run it in the background.

Locked