Microsoft Office Tutorials and References
In Depth Information
Microsoft Online Services Module
Figure 2-38 Microsoft Online Services prompt for logon credentials.
Note Why store the credentials in a variable?
Technically, for managing identity and licenses with Windows PowerShell, you can
just use the command Connect-MsolService without having to save the credential
in a variable first. However, we are doing it here because this will be needed when
we use Windows PowerShell for Exchange Online, so we are simply keeping it
consistent throughout the book.
3. Enter the following command, which is also shown in Figure 2-39:
Connect-MsolService -Credential $cred
This command will attempt to connect and authenticate to an Office 365 tenant
using the login credentials that you stored in $cred .