To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio, 2023, 4.8.223
Operating system: Windows 1
PowerShell version(s): v5, v7
*** Please add details and screenshots as needed below. ***
I have been using version 2.0.3 of the EXO PS module successfully the last few years, but was never able to get 2.0.4 or greater to work. Now Microsoft is up to 3.1.0
They are EOLing RPS based modules after June, so the need to get it working is coming quickly.
I've looked at other posts on here, but didn't see a resolution.
I've tried the following suggestions:
- Connecting to ExchangeOnline BEFORE the form loads - doesn't change anything
- Trying it in version 7 of PowerShell - it "Authenticates" but then tells me an error "Coudl not load assembly newtonsoft.json, version 13.0.0.0, publickeytoken.... and then never connects and when continue is clicked, it closes the form.
- Disabling STA mode - doesn't change anything
The issue is the form just hangs and never loads because it's stuck in the PS Module never connecting.
Has anyone successfully gotten this to work with PS Studio?
I would LOVE some help.
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
PS Studio / EXO v3 / 3.1.0 issues
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.
Re: PS Studio / EXO v3 / 3.1.0 issues
[Topic moved to PowerShell GUIs forum by moderator]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: PS Studio / EXO v3 / 3.1.0 issues
I think I may have gotten it working:
In the "Startup.pss" file in my project, I added my function: Exchange-Connect there
That function is this:
That seems to work. Loading it at the top of the form (even the main form) wouldn't work but the startup.pss seems to do the trick. I have some more testing to do, but I hope this remedies it and that all of my existing coding/scripting works as it did before.
In the "Startup.pss" file in my project, I added my function: Exchange-Connect there
That function is this:
Code: Select all
Import-Module -Name ExchangeOnlineManagement -RequiredVersion 3.1.0
$userID = $env:USERNAME + "@mydomain.com"
Connect-ExchangeOnline -UserPrincipalName $userID