Forum Discussion
dgillespie-adf
Jun 09, 2020Brass Contributor
Powershell script to export all attachments from a user mailbox and save them locally
So it seems there are a bazillion ways to do this but I settled on the simplest one and I am getting an Invoke-RestMethod error. Office 365 exchange online and I am testing with my user account and ...
Jattar74
Jun 17, 2020Copper Contributor
Try using this to pass the user credentials,
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection