Powershell Studio with vCenter 7.0

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 2 years and 2 months 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
bullitt773
Posts: 12
Last visit: Wed Mar 06, 2024 5:29 am

Powershell Studio with vCenter 7.0

Post by bullitt773 »

I've been using a PS Studio GUI script to deploy and configure VMs. Been working fine until we upgraded vCenter to 7.0. Now, as soon as the deployment begins, the pop-up box, (generated by PowerCLI) hangs, and the script stops running.
1.jpg
1.jpg (12.57 KiB) Viewed 2636 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Powershell Studio with vCenter 7.0

Post by jvierra »

Sounds like the issue is that something in the threading model of vCenter has changed or has a bug. You need to post your issue to vCenter support first since PowerShell hasn't changed.

A PSS script is just a PowerShell script. When it runs it has no relationship to the tool called PSS. To prove that run the script from the PowerShell CLI.

You can also change the threading model to see if that helps. It may be that the thread of VS is deadlocking the PowerShell thread. WinForms under PowerShell are single threaded. Only vSphere can help you check this although vSphere forums may have others who have seen this with PowerShell. At a minimum you need to provide more information.

Similar things happen with Azure modules due to incorrect load order or loading in a GUI rather than before the GUI is created.
bullitt773
Posts: 12
Last visit: Wed Mar 06, 2024 5:29 am

Re: Powershell Studio with vCenter 7.0

Post by bullitt773 »

Thanks, this runs without issue from PowerCLI. It only locks when running form Studio. You mentioned changing the threading model. Is that something done from PSS or vCenter?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Powershell Studio with vCenter 7.0

Post by jvierra »

PowerCLI is NOT PowerShell. It is a custom designed shell and IDE that is like PSS and designed to execute vSphere code.

Run under normal PowerShell directly. Pay attention to the other two suggestions I made in the last reply.
bullitt773
Posts: 12
Last visit: Wed Mar 06, 2024 5:29 am

Re: Powershell Studio with vCenter 7.0

Post by bullitt773 »

I understand the distiction between powercli, and powershell. I was just saying that when I run this script via powershell directly, there is no issue.

Also, you mentioned modifying the threading model. Where and how is that done?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Powershell Studio with vCenter 7.0

Post by jvierra »

Without more information about how you are running it the reis no way to know what might be happening. Since the script runs under PowerShell then you are referencing issues with how to use PSS and not issues with code or PowerShell itself.

For issues with the Sapien product, I recommend posting in the Sapien customer support forum for PSS.
This topic is 2 years and 2 months 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