Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Completely Remove Lab Management Configuration in TFS

DZone's Guide to

Completely Remove Lab Management Configuration in TFS

Learn how to completely remove lab management configuration from TFS instances in case you create cloned instances you don't want to contact SCVMM.

· DevOps Zone ·
Free Resource

Learn more about how CareerBuilder was able to resolve customer issues 5x faster by using Scalyr, the fastest log management tool on the market. 

If you want to completely remove Lab Management configuration from your TFS instance, you probably know TfsConfig lab /Delete command, used to remove association between one Project Collection and SCVMM. The reasons behind the need to completely remove Lab Management configuration could be various, one of the most common is: you created a cloned copy of your TFS environment for testing purpose, and you want to be 100% sure that your cloned instance does not contact SCVMM, or you can simply have multiple Test TFS Instance and you need to move lab management from one instance to another.

Figure 1: PreviewCollection has Lab Management configured.

Actual configuration, with PreviewCollection with Lab Management features enabled.












In the above picture you can see that my PreviewCollection has Lab Management feature enabled, so I can simply run the command TfsConfig lab /Delete /CollectionName:PreviewCollection to remove this association.

Figure 2: TfsConfig command in action.

TfsConfig lab /delete command in action







When command completes you can verify that the collection has not Lab Management feature enabled anymore.

Figure 3: PreviewCollection now has Lab Management feature disabled.

Project collection now have lab management feature disabled











After running that command for all your Lab Management enabled Team Project Collections you can be disappointed because you still see SCVMM host configured in TFS Console.

Figure 4: Even if none of the team projection collection is configure, SCVMM host is still listed.

Even if none of the team projection collection is configure, scvmm host is still listed







This is usually not a big problem, but if you want to be 100% sure that your TFS installation does not maintain any connection to the SCVMM instance used to manage your Lab, you can use a simple PowerShell script you can find on this Blog Post. That post is related to TFS 2010, but the script it is still valid for newer TFS releases. To write this blog post I’ve used a TFS 2015 instance and everything went good.

In that post you have an alternative solution of directly updating Tfs_Configuration database, but I strongly discourage you to use that solution because you can end with a broken installation. Never manipulate Tfs databases  directly.

Figure 5: Lab Management is completely removed from your TFS instance.

Lab Management is completely removed from your TFS instance









Now lab management configuration is completely removed from your TFS instance.

Find out more about how Scalyr built a proprietary database that does not use text indexing for their log management tool.

Topics:
devops ,tfs

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}