Is using module Az.Accounts supported in a GUI/Windows.Forms? Seeing a bunch of articles in regards to Connect-AzAccount; Looking for clarification if this is even supported. Works fine in console/command line. Importing the module just hangs the GUI, any other module works fine.
Version of PS 5.1, have 2.2.8 of Az.Accounts installed.
Thanks,
module Az.Accounts supported in a GUI/Windows.Forms?
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.
- angelofstealth
- Posts: 69
- Last visit: Wed Sep 28, 2022 10:04 am
Re: module Az.Accounts supported in a GUI/Windows.Forms?
I have not found any MS online modules that Microsoft has ever said were not supported. Check with Microsoft documentation for the module as they change things with Azure constantly.
Some modules must be imported before the form is called. Use a project to load the module in the "startup.pss" file which executes before the form is called.
Some modules must be imported before the form is called. Use a project to load the module in the "startup.pss" file which executes before the form is called.
- angelofstealth
- Posts: 69
- Last visit: Wed Sep 28, 2022 10:04 am
Re: module Az.Accounts supported in a GUI/Windows.Forms?
Thanks jvierra, will give that a shot. Appreciate the response, cheers
Re: module Az.Accounts supported in a GUI/Windows.Forms?
You are welcome.
One last thing. Learning how to use sophisticated systems like Micorsoft online services is a big challenge even for experienced programmers. Be patient and follow the blogs and the Azure web site and information. The videos have gotten quite good. Also PowerShell was not initially intended to be used with other than simple forms but it can be used in most ways with forms and Net assemblies and with most modules. The trick is to understand the differences between a script running in a form and one running outside of a form. Modules run at a prompt but the threading and behavior of a form can be different so check and experiment with the thread model (STA/MTA).
One last thing. Learning how to use sophisticated systems like Micorsoft online services is a big challenge even for experienced programmers. Be patient and follow the blogs and the Azure web site and information. The videos have gotten quite good. Also PowerShell was not initially intended to be used with other than simple forms but it can be used in most ways with forms and Net assemblies and with most modules. The trick is to understand the differences between a script running in a form and one running outside of a form. Modules run at a prompt but the threading and behavior of a form can be different so check and experiment with the thread model (STA/MTA).