- PowerShell for Office 365
- Martin Machado Prashant G Bhoyar
- 281字
- 2021-07-02 18:50:41
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:
- 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.
- The second step is to get the credentials of the user.
- The third step is to establish the connection.
Now let's perform these steps:
- In the PowerShell Session, type the following cmdlet:
Import-Module MSOnline
- 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.
- 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.
- 多媒體CAI課件設(shè)計與制作導(dǎo)論(第二版)
- 數(shù)據(jù)庫原理及應(yīng)用(Access版)第3版
- PostgreSQL Cookbook
- arc42 by Example
- Spring Boot Cookbook
- C語言程序設(shè)計
- Mastering React
- Scratch趣味編程:陪孩子像搭積木一樣學(xué)編程
- Deep Learning with R Cookbook
- Python Programming for Arduino
- Java高手是怎樣煉成的:原理、方法與實踐
- 零基礎(chǔ)學(xué)Java第2版
- Android嵌入式系統(tǒng)程序開發(fā)(基于Cortex-A8)
- Learning Perforce SCM
- Visual FoxPro程序設(shè)計