I was following this blog about renaming host headers on web applications. Not thinking clearly, I started to remove the central admin web app from iis before extending the web app again with a new host header. This worked fine on every other web app, but of course I was ON central admin when doing this, so immediately got a page not found error. Now I can't get to CA. Site is started, app pool is started.
I've tried the following to try and restore it to the way it was:
Manually removing central admin from iis
Remove-SPWebApplication -identity http://sp2013:54321 -Zone Default -Confirm
Error: The given key was not present in the dictionary.
Extending the web app
Get-SPWebApplication -Identity http://sp2013:54321 | New-SPWebApplicationExtension -Name Central Admin -HostHeader centraladmin.domain.com -Zone Default -URL http://centraladmin.domain.com -Port 54321
Error: The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
Use PSconfig to unprovision / reprovision
psconfig.exe -cmd adminvs -unprovision
- Goes through fine.psconfig.exe -cmd adminvs -provision -port <originalport> -windowsauthprovider onlyusentlm
- Port already used, choose a different port.psconfig.exe -cmd adminvs -provision -port <newport> -windowsauthprovider onlyusentlm
- The log says:An exception of typeSystem.Collections.Generic.KeyNotFoundException was thrown. Additional exception information: The given key was not present in the dictionary.
Use the Product Config wizard to remove / re-add (re-provision) Central Admin Select "Remove CA from this server" during wizard. Wizard completes successfully. Says server does not host CA anymore. I go to the CA url.. it's still there, asks me to authenticate, and then page not found.
Go through wizard again (won't let me select the old port), I select a new port, go through the wizard... failed. The log says: An exception of typeSystem.Collections.Generic.KeyNotFoundException was thrown. Additional exception information: The given key was not present in the dictionary.
New-SPCentralAdministration -port <newport>
Error:The given key was not present in the dictionary
Ran Get-SPServiceInstance | Where-Object {$_.Id –eq ‘2f93c864-85c4-4cf2-ab76-2c151826d707’} | Start-SPServiceInstance
to re-enable it from from disabled state, but still get page not found. No loopback issues. Same inside and outside of server.
Some Unexpected ULS events (I love "ignoring weird value".. sounds pretty technical)
I'm out of ideas here. Can I save my CA?
I have googled all these errors, so I don't think there's any article you can send me that I haven't already read. If you have some experience with something like this and was able to solve it, I would be greatful to hear about it.