Published: March 22, 2013
Updated: April 19, 2013
Applies To: Office 365, Windows Azure, Windows Intune
The Set-MsolADFSContext cmdlet sets the credentials to connect to Office 365 and to the Active Directory Federation Services (AD FS) server. This cmdlet must be run before making other single sign-on (also known as identity federation) cmdlet calls. If this cmdlet is called without parameters, the user will be prompted for credentials to connect to the different systems. When the AD FS server is used remotely, the user must specify the computer name of the primary AD FS server. Note that the specified logfile is shared by all single sign-on cmdlets for the session. A default logfile is created if one is not specified.
-ADFSUserCredentials <PSCredential> The credential object used to establish the administrative session on the Active Directory Federation Services 2.0 server. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false -Computer <string> The computer name of the primary AD FS 2.0 server. Specify this when the AD FS 2.0 server is used remotely. Required? true Position? named Default value Accept pipeline input? false Accept wildcard characters? false -LogFile <string> The log file used to log all single sign-on cmdlet operations for the Windows PowerShell session. If not specified, the Windows PowerShell module will auto-create a log file in %USERPROFILE%\Documents\MicrosoftOnline 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 several other places you can get more information and help. These include: