官术网_书友最值得收藏!

Verifying installation of the Office 365 admin tools

To verify the installation of the Office 365 admin tools, we can check the connection to the Office 365 subscription in a three-step process:

  1. First, we need to import the module into the PowerShell session. This step is optional depending on which PowerShell module you use. We need this step if we start Windows PowerShell, but it is not required if we start the Windows Azure Active Directory Module for Windows PowerShell.
  2. The second step is to get the credentials of the user.
  3. The third step is to establish the connection.

Now let's perform these steps:

  1. In the PowerShell Session, type the following cmdlet:
        Import-Module MSOnline
  1. In the PowerShell session, type this cmdlet:
        $cred = Get-Credential

The following screenshot shows the output of the preceding command:

    • This will launch the Windows PowerShell credential request dialog box.
    • Enter the valid Office 365 work or school username and password and click on OK:
    • The Get-Credential cmdlet does not tell us whether the username and password are correct or not.
  1. Now run the cmdlet:
        Connect-MsolService -Credential $cred

The following screenshot shows the output for the preceding command:

This cmdlet initiates a connection to the Azure Active Directory.

If the cmdlet is successful, it will not display the error message. This should be enough to verify the connection; if you prefer additional confirmation, get the details of the user account for which we provided the credentials in Step 2 using the following cmdlet:

Get-MsolUser -UserPrincipalName "valid Office 365 work or school user name"

The following screenshot shows the output for the preceding command:

If the cmdlet displays the Office 365 user information, then the connection is successful.

主站蜘蛛池模板: 吴忠市| 东安县| 济阳县| 夏津县| 镶黄旗| 同心县| 巴林右旗| 将乐县| 化州市| 南充市| 射阳县| 高密市| 工布江达县| 阳朔县| 临漳县| 来安县| 东乡县| 怀宁县| 介休市| 民和| 泰来县| 仙游县| 赣榆县| 行唐县| 阜康市| 新乡市| 界首市| 共和县| 平湖市| 康平县| 伊通| 武穴市| 芮城县| 晋州市| 保靖县| 临西县| 米林县| 阿拉善右旗| 南郑县| 通化市| 沙雅县|