David-Barrett-MS / PowerShell-EWS-Scripts

A collection of PowerShell scripts that use EWS to perform actions against Exchange mailboxes
MIT License
118 stars 13 forks source link

Merge Mailbox Folders running as a Job #30

Closed bwlonsdaledxc closed 10 months ago

bwlonsdaledxc commented 1 year ago

So 1.2.9 fixes the cert issue, however, it will no longer run as a background job (Start-Job) My feeling is to do with the way it's getting the token, or the path to the MSAL DLL isn't being accounted for.

If I run my script alone, then it accepts my username/password, runs in foreground and completes If I run my script in batch job mode, it creates the job, accepts username/password, but then throws up an instance of IE (or chrome maybe), and does a modern auth style prompt for username/password again. The job then shows as Blocked and doesn't run.

I tried hard coding the msal location path in, but didn't seem to make any difference. When I am creating the job I am passing the correct path into the scriptblock and setting the location using that, but still no go.

David-Barrett-MS commented 1 year ago

Please test with 1.3.0.