Skip to content

Set-MsolAdfsContext authentication issues. Unable to enable Remote PowerShell on ADFS Server.

June 2, 2015

In order to convert MSOL domains between Managed and Federated using ‘Windows Azure Active Directory Module for Windows PowerShell’ on a machine other than the ADFS Server itself, you must first set the ADFS context. This is performed using the following command:

Set-MsolAdfsContext -Computer {ADFS server FQDN}

If you are prompted for credentials which continually fail to work, PowerShell will eventually display an authentication error. In order to resolve, you must enable Remote PowerShell on the ADFS Server. This is performed using the following command on the ADFS Server:

Enable-PSRemoting -Force

If the following PowerShell error is returned, ensure you are running PowerShell 2.0 on the ADFS Server:

PS C:\> Enable-PSRemoting -Force
The term 'Enable-PSRemoting' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.

Enable-PSRemoting is not supported on PowerShell 1.0. This issue may affect ADFS Servers running older operating systems, such as Windows 2008 SP2.

Set-MsolAdfsContext authentication issues

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: