Published: March 22, 2013
Updated: April 19, 2013
Applies To: Office 365, Windows Azure, Windows Intune
The Connect-MsolService cmdlet will attempt to initiate a connection to the online service. The caller must provide their credential (a PSCredential object).
|This cmdlet may return a warning or error if the version of the module is out of date.|
Connect-MsolService [-Credential <PSCredential>] [<CommonParameters>]
-Credential <PSCredential> The credential to use for connecting to Office 365. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable. For more information, type, "get-help about_commonparameters".
There are a couple of ways that you can connect to the online service. The first is to simply run the cmdlet and you will be prompted for credentials. The second is to supply the credentials as a variable ($cred is used below) and then specify that variable when connecting. The following examples demonstrate further.
The following command attempts to initiate a connection. Since no credential is provided, the user is prompted to enter a username and password.
There are several other places you can get more information and help. These include: