Removing Topology Manager with Web 8

April 15th, 2016 | Posted by Robert Curlette in TopologyManager | Web8

Sometimes when setting up Topology Manager you might want to rewind, undo everything, and start fresh.  After all, in version the install is a combination of PowerShell scripts with various configuration options, authentication mechanisms, etc and it is likely to get something wrong, and you want to start all over.  If this is the case, I hope this article will help.  Below I have the output of my PowerShell console where I remove all the relevant Topology Manager pieces.  I also removed the Deployer and Discovery service, and at the end of the article I have those PowerShell scripts too, but from a separate window due to security rights.

The security rights for running and executing the Topology Manager powershell scripts can be confusing.  To run the below scripts, please go to the Windows Start screen in Windows Server 2012, search for PowerShell ISE, right click and select ‘Pin to Start’.  Then, right-click on it and select ‘Run as User’ and type in your own user params (assuming you are an Admin).  Also, your user account needs to be in the Windows Groups for Topology Manager (yes, these are new and yes it is important to be in these groups).  Now, you can run the scripts below.  To uninstall the Deployer and Discovery services, you need to run a new PowerShell window as Administrator.  Hope this helps!

PS C:\Users\rcurlette> Get-TtmMapping
CmEnvironmentId : Tridioncmsnd_landbdev2
PublicationId : tcm:0-11-1
EnvironmentPurpose : Dev
WebApplicationId : FooBuWebSite_RootWebApp
RelativeUrl : /
PrimaryMappedUrl : http://localhost:8020/
IsOffline : False
CdEnvironment : 
Id : Mapping1
ExtensionProperties : {}
PS C:\Users\rcurlette> Remove-TtmMapping
cmdlet Remove-TtmMapping at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
Id: Mapping1
PS C:\Users\rcurlette> Get-TtmWebApplication
ContextUrl : /
WebsiteId : FooBuWebSite
EnvironmentPurpose : Dev
CdEnvironment : 
ScopedRepositoryKeys : {}
Id : FooBuWebSite_RootWebApp
ExtensionProperties : {}
PS C:\Users\rcurlette> Remove-TtmWebApplication FooBuWebSite_RootWebApp
PS C:\Users\rcurlette> Get-TtmWebsite
BaseUrls : {http://localhost:8020}
CdEnvironmentId : WEBCMSND_ENV
EnvironmentPurpose : Dev
CdEnvironment : 
ScopedRepositoryKeys : {}
Id : FooBuWebSite
ExtensionProperties : {}
PS C:\Users\rcurlette> Remove-TtmWebsite FooBuWebSite
PS C:\Users\rcurlette> Get-TtmCdTopologyType
Name EnvironmentPurposes Id ExtensionProperties 
---- ------------------- -- ------------------- {Dev} FooBu_org {} {Preview, Live, Test, Dev} Foo_org {}
PS C:\Users\rcurlette> Get-TtmCdTopology
CdTopologyTypeId : FooBu_org
Name : Local
Description : 
CdEnvironmentIds : {WEBCMSND_ENV}
CdEnvironments : {}
ScopedRepositoryKeys : {}
Id : Local
ExtensionProperties : {}
PS C:\Users\rcurlette> Remove-TtmCdTopology Local
PS C:\Users\rcurlette> Remove-TtmCdTopologyType FooBu_org
Remove-TtmCdTopologyType : Item of type 'CdTopologyTypeData' can not be deleted. It is used by Business Process Type with id 'tcm:11-23307-4096' in 
the Content Management environment with id 'Tridioncmsnd_landbdev2'.
At line:1 char:1
+ Remove-TtmCdTopologyType FooBu_org
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : NotSpecified: (Tridion.Topolog...logyTypeCommand:RemoveCdTopologyTypeCommand) [Remove-TtmCdTopologyType], DataServiceE 
 + FullyQualifiedErrorId : Tridion.TopologyManager.Automation.RemoveCdTopologyTypeCommand
PS C:\Users\rcurlette> Remove-TtmCdTopologyType FooBu_org
PS C:\Users\rcurlette> Get-TtmCmEnvironment
CoreServiceRootUrl : net.tcp://localhost:2660
WebsiteRootUrl :
CoreServiceCredentials : "AuthenticationType":"Windows", "UserName":"Foo\mts_svc", "Password":"b1o$50Ming"
Id : Tridioncmsnd_landbdev2
ExtensionProperties : {}
PS C:\Users\rcurlette> Get-TtmCdEnvironment
EnvironmentPurpose : Dev
DiscoveryEndpointUrl : http://localhost:8082/discovery.svc
Credentials : "AuthenticationType":"Anonymous"
IsOffline : False
ScopedRepositoryKeys : {}
ExtensionProperties : {}
PS C:\Users\rcurlette> Remove-TtmCdEnvironment WEBCMSND_ENV

Removing the Deployer and Discovery Services

Run PowerShell as Administrator user

PS C:\SDL\Web\discovery\bin> .\uninstallService.ps1
 Stopping service 'SDLWebDiscoveryService'...
SERVICE_NAME: SDLWebDiscoveryService
 WIN32_EXIT_CODE : 0 (0x0)
 WAIT_HINT : 0xbb8
 Service 'SDLWebDiscoveryService' is stopped.
 Removing service 'SDLWebDiscoveryService'...
 [SC] DeleteService SUCCESS
 Service 'SDLWebDiscoveryService' successfully removed.
PS C:\SDL\Web\discovery\bin> cd ..
PS C:\SDL\Web\discovery> cd ..
PS C:\SDL\Web> cd .\deployer
PS C:\SDL\Web\deployer> cd bin
PS C:\SDL\Web\deployer\bin> .\uninstallService.ps1
 Stopping service 'SDLWebDeployerService'...
 [SC] ControlService FAILED 1062:
The service has not been started.
Service 'SDLWebDeployerService' is stopped.
 Removing service 'SDLWebDeployerService'...
 [SC] DeleteService SUCCESS
 Service 'SDLWebDeployerService' successfully removed.
PS C:\SDL\Web\deployer\bin>

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>