Powershell – Creating Active Directory User Accounts: with an Office 365 mailbox

Most IT admins know what a pain it is to set up Active Directory user accounts, especially when you need to setup a corresponding 365 mailbox.

Hopefully, this script is going to help you!

I’m going to guide you though using Powershell to create an Active Directory account, with a licenced Office 365 mailbox (in a hybrid Exchange 2013 environment).

I’m assuming you’re executing this script from an Admin Powershell prompt, on a Domain joined PC (It maybe useful for you to run this script in Powershell ISE).

This script will:

  • Create an Active Directory user account + allow you to assign a user password (securely).
  • Complete AD account details such as telephone number and address (useful if you are using my email signature script guide).
  • Create an Office 365 mailbox (this script assumes that you are running in Exchange hybrid mode (i.e. your business also has an on Premise Exchange server).
  • Turn on litigation hold enabled (for this to work, you will need the correct licences, ie: E3).
  • Assign a 365 licence (I’m also assigning an ATP licence, Windows 10 licence and PowerBI standard licence).

Continue reading


How to standardize your company email signature

Often, companies have a mismatch of email signatures. Nothing standard or manageable throughout their business.   There are software applications that can assist, but they can be costly.

In this post, i will detail how to roll out a standard email signature using nothing more that a vb script, group policy and a little elbow grease with regards to your Active Directory.

Lets begin:

Requirement:  To implement a standard email signature throughout your organisation

Solution: Create VB script to pull data from Active Directory and set it as the users default signature within Outlook (tested in Outlook 2007, 2010 and 2013).

Continue reading