SCVVM Command freezing in Forms

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 5 years and 5 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: SCVVM Command freezing in Forms

Post by jvierra »

Have you run this in a simple new form with only that code in a button?
User avatar
ITZBund_WisIT
Posts: 13
Last visit: Thu Mar 14, 2024 1:11 am

Re: SCVVM Command freezing in Forms

Post by ITZBund_WisIT »

Sorry for the delay.
I've just tried a simple Form instead of a Form Project and the result is the exactly same.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: SCVVM Command freezing in Forms

Post by jvierra »

Many modules cannot be run in a form. This includes many Azure modules. Modules that hang like this can be run as a job in the form and will usually work correctly.
User avatar
ITZBund_WisIT
Posts: 13
Last visit: Thu Mar 14, 2024 1:11 am

Re: SCVVM Command freezing in Forms

Post by ITZBund_WisIT »

I've tried implementing this now and it seems to work, even though badly.
The command finally does end after being called, which is great.
The problem is that I have to put a bunch of the code into the job and not just the Set-SCLogicalNetworkDefinition because everything i pass to it (with param or $using:) is deserialized. I can live with that, but not with the output using Receive-Job also being deserialized.
I got past the command and it already looks like another command has the same problem. I'll continue that after my vacation, so thanks for the hint with the jobs.
This topic is 5 years and 5 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