Arkisto

Posts Tagged ‘office365’

Workaround: AD Federation and Office 365 problems on Windows Server 2012

When configuring Office 365 and running Set-MsolADFSContext command on Windows Server 2012 you are most likely to receive the following type error:

Set-MsolADFSContext : The ’Microsoft.Adfs.PowerShell’ Active Directory Federation Services 2.0 snap-in for Windows PowerShell could not register on ’xxxx’ computer.  Make sure that you either specify the name of the Active Directory Federation Services 2.0 server using the -Computer parameter or that you are running the installation on the AD FS 2.0 server.

This is a result of the fact that ADFS is now builtin to Windows Server 2012 and Microsoft.ADFS.PowerShell snap-in is no longer required or registered with Windows Server 2012. Microsoft Online Services Module for Windows PowerShell is not aware that this has happened and is still searching the required Snap-In and resulting to the error when it is not found.

The problem can be circumvented with the following registry entry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.Adfs.PowerShell]
”ApplicationBase”=”C:\\Windows\\ADFS”
”Version”=”6.2.0.0”
”AssemblyName”=”Microsoft.IdentityServer.PowerShell, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
”Description”=”This powershell snap-in contains cmdlets used to manage Microsoft Identity Server resources.”
”PowerShellVersion”=”1.0”
”ModuleName”=”C:\\Windows\\ADFS\\Microsoft.IdentityServer.PowerShell.dll”
”Vendor”=”Microsoft”