Updated: July 30, 2015
Applies To: Azure, Office 365, Windows Intune
- The cmdlets were previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets.
The Set-MsolADFSContext cmdlet sets the credentials to connect to 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.
Set-MsolADFSContext -Computer <string> [-ADFSUserCredentials <PSCredential>] [-LogFile <string>] [<CommonParameters>]
-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: