PowerShell-EWS-Scripts icon indicating copy to clipboard operation
PowerShell-EWS-Scripts copied to clipboard

Merge-MailboxFolders

Open David-Barrett-MS opened this issue 2 years ago • 5 comments

Add Target Mailbox to CSV import feature.

David-Barrett-MS avatar Feb 23 '23 09:02 David-Barrett-MS

Hi David, When i try the approach below, i get a prompt for the web URL after ever mailbox is processed. Is there a quick way around that by reusing the existing URL code? It appears that is what the script is meant to do with the existing CSV implementation you built in anyway.

#Script Name = MirrorMailboxContents.ps1

start-transcript -path .\MirrorMailboxContents.txt

Import-Csv MirrorMailbox.csv | ForEach-Object{ $SourceMBX = $.UserPrincipalName $TargetMBX = $.UserPrincipalNameShared .\Merge-MailboxFolder.ps1 -SourceMailbox $SourceMBX -TargetMailbox $TargetMBX -ProcessSubfolders -CreateTargetFolder -Office365 -OAuth -OAuthTenantId "01088aa4-1bdc-42ad-xYYx-17ef028779fc" -Copy }

Stop-transcript

mfabunmi2023 avatar Feb 23 '23 10:02 mfabunmi2023

Assuming you mean an auth prompt, you'll need to use app auth to avoid that. Delegate auth will prompt each time the script is run.

David-Barrett-MS avatar Jun 07 '23 07:06 David-Barrett-MS

Hi David, How can we switch to using App Authentication?

Cheers, Michael Fabunmi

Get Outlook for Androidhttps://aka.ms/ghei36


From: David Barrett @.> Sent: Wednesday, June 7, 2023 8:30:36 am To: David-Barrett-MS/PowerShell-EWS-Scripts @.> Cc: mfabunmi2023 @.>; Comment @.> Subject: Re: [David-Barrett-MS/PowerShell-EWS-Scripts] Merge-MailboxFolders (Issue #25)

Assuming you mean an auth prompt, you'll need to use app auth to avoid that. Delegate auth will prompt each time the script is run.

— Reply to this email directly, view it on GitHubhttps://github.com/David-Barrett-MS/PowerShell-EWS-Scripts/issues/25#issuecomment-1580101088, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5RJ2C62TRWDEX2NDRCKGI3XKAUZTANCNFSM6AAAAAAVFMLCZQ. You are receiving this because you commented.Message ID: @.***>

mfabunmi2023 avatar Jun 08 '23 15:06 mfabunmi2023

https://github.com/David-Barrett-MS/PowerShell-EWS-Scripts/wiki/Exchange-Online-OAuth-Configuration

David-Barrett-MS avatar Jun 08 '23 15:06 David-Barrett-MS