Tag Archives: trusted application pool

Difficulty removing a legacy trusted application pool.

I ran into this issue when I found myself trying to remove a server from the topology and realized there was no delete option. It turns out that there was a trusted application pool hanging around tied to this server, no big deal, I’ll just delete it.

PS C:\Users\acaragol> Get-CsTrustedApplicationPool -identity TrustedApplicationPool:oldlyncserver.contoso.com |Remove-CsTrustedApplicationPool
Remove-CsTrustedApplicationPool : Cannot remove legacy trusted application
pool. Use the legacy tools to remove the pool, then run Merge-CsTopology.
At line:1 char:89
+ … .contoso.com |Remove-CsTrustedApplicationPool
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Remove-CsTrustedApplicationPo
ol], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.Rtc.Managemen

Today, I’m ashamed to admit I made this much harder than it had to be. The merge-cstopology usually reserved for OCS migrations triggered legacy thoughts of OCS 2007 R2 admin tools. OCS has been long gone in this environment. Rather that stopping to think about it, I was in a rush and ran to the search engines. There’s not a lot out there on this error at this time, perhaps because most figure it out more quickly than I did and don’t actually need to search. What does exist are references to exporting the topology and manually editing the XML (which is not a good idea in this instance). There is also a reference to hacking it out using ADSIEdit and some other handy tools which can be daunting. How did I get rid of it? I used the Lync 2010 PowerShell. This is my legacy tool, nothing to do with the old OCS implementation or a partially created object, nothing hard. Just rerun the command from a Lync 2010 server’s PowerShell and you’re done.

PS C:\Users\acaragol> Get-CsTrustedApplicationPool -identity TrustedApplicationPool:oldlyncserver.contoso.com |Remove-CsTrustedApplicationPool
One or more application or external servers have been deleted.
When you delete an application or external server, you delete all configuration state for the hosted applications. Do you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(Default is “Y”):y
PS C:\Users\acaragol>