Powershell Studio with vCenter 7.0
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.
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.
-
- Posts: 12
- Last visit: Wed Mar 06, 2024 5:29 am
Powershell Studio with vCenter 7.0
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.
Re: Powershell Studio with vCenter 7.0
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.
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.
-
- Posts: 12
- Last visit: Wed Mar 06, 2024 5:29 am
Re: Powershell Studio with vCenter 7.0
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?
Re: Powershell Studio with vCenter 7.0
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.
Run under normal PowerShell directly. Pay attention to the other two suggestions I made in the last reply.
-
- Posts: 12
- Last visit: Wed Mar 06, 2024 5:29 am
Re: Powershell Studio with vCenter 7.0
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?
Also, you mentioned modifying the threading model. Where and how is that done?
Re: Powershell Studio with vCenter 7.0
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.
For issues with the Sapien product, I recommend posting in the Sapien customer support forum for PSS.