Friday, June 29, 2012

Uninstalling and re-installing ADFS v. 2.0

I recently screwed up my ADFS v. 2.0 installation on a test environment by using a bad SSL (Service Communications) certificate.  Of course, the UI nor PowerShell offered any help in fixing this issue, therefore, I had to resort to completely uninstalling and re-installing ADFS v. 2.0.  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:


  1. Go into Control Panel-->Programs
  2. Uninstall a Program
  3. Click on View Installed Updates in the left hand pane
  4. Click on Active Directory Federation Services 2.0 listed under the Windows heading
  5. Click the Uninstall button
  6. When prompted for the confirmation, click Yes
  7. Click Restart Later to postpone restarting the computer
  8. Now it is time to clean up the IIS installation of ADFS
    • Open up a Command Prompt window
    • Type the following command at the command prompt: C:\Windows\System32\inetsrv\appcmd 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:\Windows\System32\inetsrv\appcmd 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:\inetpub\adfs)
  9. Now you should be able to restart the computer
  10. After re-starting the computer, you can proceed with re-installing ADFS (and perhaps Update Rollup 2).
  11. Once ADFS has been re-installed, you can proceed with the ADFS Configuration Wizard once more
  12. Proceed through the ADFS Configuration Wizard as before
  13. When you get to the step where you have to delete the existing ADFS database, check the checkbox to "Delete database"
  14. If everything works correctly, the ADFS Configuration wizard should complete successfully (with perhaps some warnings).

8 comments:

  1. Hi , this is Vishnu, ur blog provides lots of info. thanks. but
    I faced one issue in CRM 2011 , in Marketing List entity under Collaboration "sending Email" option is unchecked. when i try to check it for sending email from crm , i cant able to check it , since it changed to read only format. how to check that sending email box , or is there any other solution for sending email after associating marketing list with campaigns?
    Thanks in advance.

    ReplyDelete
  2. Hi

    Is this apply to ADFS 2.0 on Windows 2008 R2 as well.

    ReplyDelete
  3. No Minesh , not related to ADFS or others.. I have a issue in my side , thats im asking. If u know the answer for the question , that i asked above pls answer me.

    ReplyDelete
  4. Thanks for uninstalling procedure, it works perfectly..

    ReplyDelete
  5. just a little thing it didn't work for me when I did it:
    on the step 8 is actually: C:\Windows\System32\inetsrv\appcmd delete app / “Default Web Site/adfs”
    thanks for the tip

    ReplyDelete
  6. btw... after trying to reinstall I'm getting this:
    The Windows update "Update for Windows (KB974408)" could not be installed because of an error: 2147549183 "Catastrophic failure" (Command line: ""C:\Windows\System32\wusa.exe" c:\b05aba62db2972cd0c\adfs-sts.msu /quiet /norestart")

    ReplyDelete
  7. on Windows 2008 R2 a good commande it's appcmd.exe delete app /app.name:"Default Web Site/adfs"

    ReplyDelete