Exporting mailbox from office 365 using powershell
I have an on premise MS environment, but our email is hosted in 0365. We synch our AD using AZURE directory services.I want to automate a user leaving via scripts attached to a OU in the AD. One item is to archive their mailbox to a file server share, the other is to archive their One Drive data to a file share. The file share will be the users 'user profile' folder Is this possible using powershell ? I've been told not.