If you end up having a problem with ADFS and decided to remove and re-install. Here is procedure. It is recommended that you follow the steps below to perform a COMPLETE cleanup of ADFS.
If you forget to perform one of the cleanup operations such as deleting the application directories from the IIS website, you will receive an error message similar to the following:
Uninstall AD FS 2.0
· Open APPWIZ.CPL.
· Click View Installed Updates and type ACTIVE into the Search Programs and Features search bar.
· Select Active Directory Federation Services 2.0 and click Uninstall.
Clean up the IIS installation of ADFS
· Open up a Command Prompt window
· Type the following command at the command prompt: C:WindowsSystem32inetsrvappcmd delete app “Default Web Site/adfs”
· If the command was successful, it should indicate that the Web App was deleted such as the following message: APP object “Default Web Site/adfs” deleted
· Type the following command at the command prompt: C:WindowsSystem32inetsrvappcmd delete app “Default Web Site/adfs/ls”
· If the command was successful, it should indicate that the Web App was deleted such as the following message: APP object “Default Web Site/adfs/ls” deleted
· Delete the ADFS folder from the file system (usually under C:inetpubadfs)
Remove databases from WID and Uninstall WID
1. Downloaded and installed SQL Server 2008 R2 Express Management Tools.
2. Using SQL Server Management Studio (SSMS) connected to:
\.pipeMSSQL$MICROSOFT##SSEEsqlquery
3. Executed the following T-SQL script:
use master;
go
sp_detach_db ‘adfsconfiguration’;
go
sp_detach_db ‘adfsartifactstore’;
go
4. When complete I deleted the data files:
del C:WindowsSYSMSISSEEMSSQL.2005MSSQLDataadfs*
5. Remove WID using Server Manager, e.g.
Import-Module ServerManager
Get-WindowsFeature | ? {
$_.Installed -and
$_.Name -eq ‘Windows-Internal-DB’
} | Remove-WindowsFeature
Now restart the computer. At this point all should be removed and all well
