0 votes

I'd like to set up a business rule to automatically enable the Office 365 archiving feature for newly created users.

I've found the PowerShell code to do this, but I'm not sure how to get it set up in Adaxes.

I've already got my business rules #1) to create the Office 365 mailbox in Office 365 and #2 activate their license (we have E3 licenses).

So I'm assuming I'll need to add the following command as a PowerShell script for archiving:

Enable-Mailbox -Identity %mail% -Archive

Here's the command for setting the retention policy:

Set-Mailbox %mail% -RetentionPolicy <name of policy>

Is there more that I need to do to get it to connect to our Office 365 account or does it know to use that automatically?

by (440 points)

1 Answer

0 votes
by (215k points)
selected by
Best answer


You don't need PowerShell code to accomplish this, you can do this with built-in Adaxes actions using the UI. For instructions on how to accomplish your task, have a look at the Automate Exchange Mailbox Configuration Tutorial. In particular, see Example 5 and Example 6 in step 4. On the last step of Example 6, you don't need to select an archive database because for Exchange Online mailboxes a database is provided automatically.


Thank you - I completely missed those instructions.

Related questions

0 votes
1 answer

I have a handful of manual PowerShell scripts that I run after a new user is created. Most of these commands can be done using a ... , SendOnBehalf -AuditOwner UpdateFolderPermission, MailboxLogin, Create, SoftDelete, HardDelete, Update, MoveToDeletedItems

asked Jul 10, 2019 by bjzielinski (70 points)
0 votes
1 answer

I am trying to automate some of my o365 scripts so that the helpdesk can run them with elevated permissions and not have that ... -Credential $o365Credentials -Authentication Basic -AllowRedirection Import-PSSession $session -AllowClobber -DisableNameChecking

asked Nov 23, 2018 by jbadry (410 points)
0 votes
0 answers

Hi Again, We have office 365 that is setup through the cloud service portion. Unfortunately when we setup a new user including the email address, it doesn't ... need to do some powershell scripting to populate the email address automatically? Thanks, PWReset

asked May 9, 2017 by PasswordReset (70 points)
0 votes
1 answer

We are training our Help Desk to check for proper Office365 licensing before escalating tickets, but I cannot see where to allow "sub-licensing" views (meaning the individual ... those choices in either the Adaxes Admin Console, or the Web Portal? Thank you!

asked Jul 15, 2015 by PunkinDonuts (360 points)
0 votes
1 answer

Do these play well together?

asked Oct 10, 2013 by MeliOnTheJob (1.7k points)
2,607 questions
2,344 answers
862,404 users