Azure Active Directory Module for Windows Powershell – How to Connect

I recently needed to use this and well; I’m learning as I go.

So one of the tasks I needed to do in O365 was to delete a user.  This required me to use Azure AD PowerShell.

Fist step was simple.  Install Windows Azure Active Directory Module for Windows PowerShell onto a system.

Next was to launch it.

Cool, I am in powershell!  But what next, how do I connect.

To connect you enter the following cmdlet’s:

which will prompt you for your credentials and stores them within $msolcred.

Next we enter

to connect using the stored credentials

That’s it.

For more info on Azure Powershell – http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/

Related FAQs:

How can I determine what version of AAD PowerShell I have?
You can run the get-item cmdlet to check the version of the DLL files of the module that you have currently installed:

Where can I find the latest version of AAD PowerShell?

The following fwlinks should always point to the most current version of AAD PowerShell
Azure Active Directory Module for Windows PowerShell (64-bit version) This link is external to TechNet Wiki. It will open in a new window.
Azure Active Directory Module for Windows PowerShell (32-bit version) This link is external to TechNet Wiki. It will open in a new window.

O365: The target mailbox doesn’t have an SMTP proxy matching

Hello All,

I am still working with some Office 365 issues. This one involves me off-boarding a previously migrated account back to my on-premise Exchange Server.



I had entered the wrong domain for “Target Deliver Domain” which caused the migration to fail with the following error:

The target  mailbox doesn’t have an SMTP proxy matching…

To resolve this issue

  • Open Exchange Admin Center on-premises Exchange server.
  • Click Mail flow, and then click Email address policies.
  • Select the email address policy, and then click Edit
  • Locate the domain (<domain>.mail.onmicrosoft.com).
  • Use this for Target Delivery Domain and attempt to migrate again.

Ref:  http://support.microsoft.com/kb/2939340

O365: On-premises users aren’t getting email messages from Office 365 users in an Exchange hybrid deployment

It was complex, and it was difficult; but I was able to get a hybrid setup with my exchange server (on-premises) with Office 365

I am still working on other items such as logging in with a default domain suffix of my choosing but more on that later.

The issue I had faced involved sending emails from my email account now hosted in O365 to emails on my On-Premise Exchange Server. Each attempt would fail.

So I followed the steps listed in the following kb article  kb2730609

  1. Sign in to the Office 365 portal (https://portal.microsoftonline.com) as a global admin.
  2. In the header, click Admin, and then click Exchange.
  3. In the left navigation pane of the Exchange Admin Center, click Mail Flow, and then click Accepted Domains.
  4. Select the domain that is set up for the hybrid deployment, and then click Details.
  5. Select Shared, and then click Save.

As I said prior somethings were complex and I will address that as this was only part of my resolution